Skip to content

Commit

Permalink
Merge branch 'impersonated-creds-fix' of github.com:googleapis/google…
Browse files Browse the repository at this point in the history
…-auth-library-python into impersonated-creds-fix
  • Loading branch information
busunkim96 committed Mar 6, 2020
2 parents 5a318f6 + f8eed76 commit cabb98b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion system_tests/test_oauth2_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ def test_refresh(authorized_user_file, http_request, token_info):

# Canonical list of scopes at https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login
# or do `gcloud auth application-defaut login --help`
assert set(info_scopes) == set(
canonical_scopes = set(
[
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/cloud-platform",
"openid",
]
)
# When running the test locally, we always have an additional "accounts.reauth" scope.
canonical_scopes_with_reauth = canonical_scopes.copy()
canonical_scopes_with_reauth.add("https://www.googleapis.com/auth/accounts.reauth")
assert set(info_scopes) == canonical_scopes or set(info_scopes) == canonical_scopes_with_reauth

0 comments on commit cabb98b

Please sign in to comment.