chore: use mocked credentials in tests (#900)
* test: use self.MOCK_CREDENTIALS in tests
* Update test_discovery.py
* Update test_discovery.py
diff --git a/tests/test_discovery.py b/tests/test_discovery.py
index 6400f21..217f69d 100644
--- a/tests/test_discovery.py
+++ b/tests/test_discovery.py
@@ -521,7 +521,11 @@
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 +533,9 @@
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_CREDENTIALS
)
self.assertEqual(plus._baseUrl, api_endpoint)