From afde07cb3ba22f7afbd5092a8bc7921886b775d8 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Wed, 13 May 2020 12:45:25 -0700 Subject: [PATCH 1/3] test: use self.MOCK_CREDENTIALS in tests --- tests/test_discovery.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_discovery.py b/tests/test_discovery.py index 6400f214..7e3d0f85 100644 --- a/tests/test_discovery.py +++ b/tests/test_discovery.py @@ -521,7 +521,10 @@ def test_api_endpoint_override_from_client_options(self): options = google.api_core.client_options.ClientOptions( api_endpoint=api_endpoint ) - plus = build_from_document(discovery, client_options=options) + plus = build_from_document(discovery, + client_options=options, + credentials=self.MOCK_CREDENTIALS + ) self.assertEqual(plus._baseUrl, api_endpoint) @@ -529,7 +532,9 @@ def test_api_endpoint_override_from_client_options_dict(self): discovery = open(datafile("plus.json")).read() api_endpoint = "https://foo.googleapis.com/" plus = build_from_document( - discovery, client_options={"api_endpoint": api_endpoint} + discovery, + client_options={"api_endpoint": api_endpoint}, + credentials=self.MOCK_CREDENTIAL ) self.assertEqual(plus._baseUrl, api_endpoint) From bd07c14c910d2ed30a66e230b23de6c5a8d38c37 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Wed, 13 May 2020 12:46:20 -0700 Subject: [PATCH 2/3] Update test_discovery.py --- tests/test_discovery.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_discovery.py b/tests/test_discovery.py index 7e3d0f85..f5da46bd 100644 --- a/tests/test_discovery.py +++ b/tests/test_discovery.py @@ -521,7 +521,8 @@ def test_api_endpoint_override_from_client_options(self): options = google.api_core.client_options.ClientOptions( api_endpoint=api_endpoint ) - plus = build_from_document(discovery, + plus = build_from_document( + discovery, client_options=options, credentials=self.MOCK_CREDENTIALS ) From 144d697ae06b4c4cf8699063b474b816ac36d1cb Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Wed, 13 May 2020 12:46:56 -0700 Subject: [PATCH 3/3] Update test_discovery.py --- tests/test_discovery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_discovery.py b/tests/test_discovery.py index f5da46bd..217f69d0 100644 --- a/tests/test_discovery.py +++ b/tests/test_discovery.py @@ -535,7 +535,7 @@ def test_api_endpoint_override_from_client_options_dict(self): plus = build_from_document( discovery, client_options={"api_endpoint": api_endpoint}, - credentials=self.MOCK_CREDENTIAL + credentials=self.MOCK_CREDENTIALS ) self.assertEqual(plus._baseUrl, api_endpoint)