diff options
author | Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> | 2020-09-02 12:55:42 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-02 14:55:42 -0400 |
commit | 41599ae932db31cf692d2c7bec15d8bb1778ab50 (patch) | |
tree | a0d52da68f8b43cadd7c4c4b75e1d37a7c68962b /tests | |
parent | 6269643ee675f02c39795e163a12da6b27d991d2 (diff) | |
download | google-auth-library-python-41599ae932db31cf692d2c7bec15d8bb1778ab50.tar.gz |
refactor: split 'with_quota_project' into separate base class (#561)
Co-authored-by: Tres Seaver <tseaver@palladion.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test__default.py | 2 | ||||
-rw-r--r-- | tests/test_credentials.py | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/tests/test__default.py b/tests/test__default.py index 55a14c2..2738e22 100644 --- a/tests/test__default.py +++ b/tests/test__default.py @@ -49,7 +49,7 @@ CLIENT_SECRETS_FILE = os.path.join(DATA_DIR, "client_secrets.json") with open(SERVICE_ACCOUNT_FILE) as fh: SERVICE_ACCOUNT_FILE_DATA = json.load(fh) -MOCK_CREDENTIALS = mock.Mock(spec=credentials.Credentials) +MOCK_CREDENTIALS = mock.Mock(spec=credentials.CredentialsWithQuotaProject) MOCK_CREDENTIALS.with_quota_project.return_value = MOCK_CREDENTIALS LOAD_FILE_PATCH = mock.patch( diff --git a/tests/test_credentials.py b/tests/test_credentials.py index 2023fac..0637b01 100644 --- a/tests/test_credentials.py +++ b/tests/test_credentials.py @@ -115,12 +115,6 @@ def test_anonymous_credentials_before_request(): assert headers == {} -def test_anonymous_credentials_with_quota_project(): - with pytest.raises(ValueError): - anon = credentials.AnonymousCredentials() - anon.with_quota_project("project-foo") - - class ReadOnlyScopedCredentialsImpl(credentials.ReadOnlyScoped, CredentialsImpl): @property def requires_scopes(self): |