diff --git a/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/gcs_service_test.py b/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/gcs_service_test.py index 20340bd..a5b5e9e 100644 --- a/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/gcs_service_test.py +++ b/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/gcs_service_test.py @@ -3,7 +3,8 @@ from happtiq_commons_google_cloud.gcs_api_service import GcsApiService @pytest.fixture -def gcs_api_service(): +def gcs_api_service(monkeypatch): + monkeypatch.setattr("google.auth.default", MagicMock(return_value=(MagicMock(universe_domain="googleapis.com"),"some-proje"))) return GcsApiService(timeout=30) def mock_storage_client(): diff --git a/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/pubsub_api_service_test.py b/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/pubsub_api_service_test.py index cbff902..09e6b53 100644 --- a/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/pubsub_api_service_test.py +++ b/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/pubsub_api_service_test.py @@ -5,7 +5,8 @@ @pytest.fixture -def pubsub_api_service(): +def pubsub_api_service(monkeypatch): + monkeypatch.setattr("google.auth.default", MagicMock(return_value=(MagicMock(),"some-proje"))) return PubsubApiService() def test_publish_message(pubsub_api_service, monkeypatch): diff --git a/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/secret_manager_api_service_test.py b/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/secret_manager_api_service_test.py index a56b969..ca8d31d 100644 --- a/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/secret_manager_api_service_test.py +++ b/packages/happtiq_commons_google_cloud/tests/happtiq_commons_google_cloud/secret_manager_api_service_test.py @@ -3,7 +3,8 @@ from unittest.mock import MagicMock, patch @pytest.fixture -def secret_manager_api_service(): +def secret_manager_api_service(monkeypatch): + monkeypatch.setattr("google.auth.default", MagicMock(return_value=(MagicMock(),"some-proje"))) return SecretManagerApiService() def test_read_secret(secret_manager_api_service, monkeypatch):