File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2525@pytest .mark .asyncio
2626async def test_application_default_credentials (verify_refresh ):
2727 credentials , project_id = _default_async .default_async ()
28- breakpoint ()
2928
3029 if EXPECT_PROJECT_ID is not None :
3130 assert project_id is not None
3231
3332 try :
3433 await verify_refresh (credentials )
35- except RefreshError :
36- # allow expired credentials for explicit user tests
37- if not CREDENTIALS .endswith ("authorized_user.json" ):
34+ except RefreshError as e :
35+ # allow expired credentials for explicit_authorized_user tests
36+ # 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 ):
3838 raise
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ def test_application_default_credentials(verify_refresh):
2929
3030 try :
3131 verify_refresh (credentials )
32- except RefreshError :
32+ 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" ):
35+ if not CREDENTIALS .endswith ("authorized_user.json" ) or "Token has been expired or revoked" not in str ( e ) :
3636 raise
You can’t perform that action at this time.
0 commit comments