fix: only add IAM scope to credentials that can change scopes (#451)
diff --git a/system_tests/noxfile.py b/system_tests/noxfile.py
index e37049e..8110632 100644
--- a/system_tests/noxfile.py
+++ b/system_tests/noxfile.py
@@ -170,7 +170,8 @@
# Test sesssions
TEST_DEPENDENCIES = ["pytest", "requests"]
-PYTHON_VERSIONS=['2.7', '3.7']
+PYTHON_VERSIONS = ["2.7", "3.7"]
+
@nox.session(python=PYTHON_VERSIONS)
def service_account(session):
@@ -187,6 +188,13 @@
@nox.session(python=PYTHON_VERSIONS)
+def impersonated_credentials(session):
+ session.install(*TEST_DEPENDENCIES)
+ session.install(LIBRARY_DIR)
+ session.run("pytest", "test_impersonated_credentials.py")
+
+
+@nox.session(python=PYTHON_VERSIONS)
def default_explicit_service_account(session):
session.env[EXPLICIT_CREDENTIALS_ENV] = SERVICE_ACCOUNT_FILE
session.env[EXPECT_PROJECT_ENV] = "1"