feat: add quota project to base credentials class (#546)
diff --git a/tests/test_credentials.py b/tests/test_credentials.py
index 16ddd9b..2023fac 100644
--- a/tests/test_credentials.py
+++ b/tests/test_credentials.py
@@ -24,6 +24,9 @@
def refresh(self, request):
self.token = request
+ def with_quota_project(self, quota_project_id):
+ raise NotImplementedError()
+
def test_credentials_constructor():
credentials = CredentialsImpl()
@@ -112,6 +115,12 @@
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):