Skip to content

Commit

Permalink
chore: use mocked credentials in tests (#900)
Browse files Browse the repository at this point in the history
* test: use self.MOCK_CREDENTIALS in tests

* Update test_discovery.py

* Update test_discovery.py
  • Loading branch information
busunkim96 committed May 14, 2020
1 parent 54aa94d commit 8ed1dcd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_discovery.py
Expand Up @@ -521,15 +521,21 @@ 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)

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_CREDENTIALS
)

self.assertEqual(plus._baseUrl, api_endpoint)
Expand Down

0 comments on commit 8ed1dcd

Please sign in to comment.