Skip to content

Commit c37d565

Browse files
authored
Merge branch 'main' into fix-credentials-scopes-set-issue-15605314498929918698
2 parents 6270cd4 + cccad82 commit c37d565

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

system_tests/system_tests_async/test_default.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,12 @@ async def test_application_default_credentials(verify_refresh):
3434
except RefreshError as e:
3535
# allow expired credentials for explicit_authorized_user tests
3636
# TODO: https://github.com/googleapis/google-auth-library-python/issues/1882
37-
if not CREDENTIALS.endswith("authorized_user.json") or "Token has been expired or revoked" not in str(e):
37+
if not CREDENTIALS.endswith("authorized_user.json"):
38+
raise
39+
40+
error_message = str(e)
41+
if (
42+
"Token has been expired or revoked" not in error_message
43+
and "invalid_grant" not in error_message
44+
):
3845
raise

system_tests/system_tests_sync/test_default.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,12 @@ def test_application_default_credentials(verify_refresh):
3232
except RefreshError as e:
3333
# allow expired credentials for explicit_authorized_user tests
3434
# TODO: https://github.com/googleapis/google-auth-library-python/issues/1882
35-
if not CREDENTIALS.endswith("authorized_user.json") or "Token has been expired or revoked" not in str(e):
35+
if not CREDENTIALS.endswith("authorized_user.json"):
36+
raise
37+
38+
error_message = str(e)
39+
if (
40+
"Token has been expired or revoked" not in error_message
41+
and "invalid_grant" not in error_message
42+
):
3643
raise

0 commit comments

Comments
 (0)