Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix credential scope assertions #223

Merged
merged 2 commits into from
Feb 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/unit/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _constructor_test_helper(

self.assertIs(client._credentials, expected_creds)
if expected_scopes is not None:
creds.with_scopes.assert_called_once_with(expected_scopes)
creds.with_scopes.assert_called_once_with(expected_scopes, default_scopes=None)

self.assertEqual(client.project, self.PROJECT)
self.assertIs(client._client_info, expected_client_info)
Expand Down Expand Up @@ -235,7 +235,7 @@ def test_instance_admin_api(self, mock_em):
credentials=mock.ANY, client_info=client_info, client_options=client_options
)

credentials.with_scopes.assert_called_once_with(expected_scopes)
credentials.with_scopes.assert_called_once_with(expected_scopes, default_scopes=None)

@mock.patch("google.cloud.spanner_v1.client._get_spanner_emulator_host")
def test_instance_admin_api_emulator_env(self, mock_em):
Expand Down Expand Up @@ -333,7 +333,7 @@ def test_database_admin_api(self, mock_em):
credentials=mock.ANY, client_info=client_info, client_options=client_options
)

credentials.with_scopes.assert_called_once_with(expected_scopes)
credentials.with_scopes.assert_called_once_with(expected_scopes, default_scopes=None)

@mock.patch("google.cloud.spanner_v1.client._get_spanner_emulator_host")
def test_database_admin_api_emulator_env(self, mock_em):
Expand Down