Skip to content

Commit 8ed1dcd

Browse files
authored
chore: use mocked credentials in tests (#900)
* test: use self.MOCK_CREDENTIALS in tests * Update test_discovery.py * Update test_discovery.py
1 parent 54aa94d commit 8ed1dcd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/test_discovery.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,15 +521,21 @@ def test_api_endpoint_override_from_client_options(self):
521521
options = google.api_core.client_options.ClientOptions(
522522
api_endpoint=api_endpoint
523523
)
524-
plus = build_from_document(discovery, client_options=options)
524+
plus = build_from_document(
525+
discovery,
526+
client_options=options,
527+
credentials=self.MOCK_CREDENTIALS
528+
)
525529

526530
self.assertEqual(plus._baseUrl, api_endpoint)
527531

528532
def test_api_endpoint_override_from_client_options_dict(self):
529533
discovery = open(datafile("plus.json")).read()
530534
api_endpoint = "https://foo.googleapis.com/"
531535
plus = build_from_document(
532-
discovery, client_options={"api_endpoint": api_endpoint}
536+
discovery,
537+
client_options={"api_endpoint": api_endpoint},
538+
credentials=self.MOCK_CREDENTIALS
533539
)
534540

535541
self.assertEqual(plus._baseUrl, api_endpoint)

0 commit comments

Comments
 (0)