Commit cccad82
authored
test: handle invalid_grant in default creds system tests (#1901)
Updated `system_tests/system_tests_sync/test_default.py` and `system_tests/system_tests_async/test_default.py` to catch `RefreshError` and check for "invalid_grant" in the error message when running with `authorized_user.json` credentials. This allows the test to pass by confirming the library correctly received the error from the server, acknowledging that the CI credentials are often stale.
This builds on @daniel-sanche' work in [PR #1883](https://togithub.com/googleapis/google-auth-library-python/pull/1883).
Recent changes to `main` appear to have adjusted the response values in these tests and was leading to them failing during CI/CD presubmit tests ([see example below](https://togithub.com/googleapis/google-auth-library-python/pull/1901#issuecomment-3682277336)). This update now prevents those failing tests.
---
*PR created automatically by Jules for task [5370487295365926138](https://jules.google.com/task/5370487295365926138) started by @chalmerlowe*1 parent 12f4470 commit cccad82
File tree
2 files changed
+16
-2
lines changed- system_tests
- system_tests_async
- system_tests_sync
2 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
0 commit comments