refactor: split 'with_quota_project' into separate base class (#561)
Co-authored-by: Tres Seaver <tseaver@palladion.com>
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 @@
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 @@
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):