Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We started running tests in parallel and this uncovered, strangely see this only in local run.
oauth_provider
fixture in the test file is defined as an async fixture (async def oauth_provider), but two tests were trying to use it as a synchronous fixture:est_has_valid_token_expired
- was a synchronous test (def test_...) but used the async oauth_provider fixturetest_scope_priority_no_scope
- was also a synchronous test but used the async oauth_provider fixtureThis caused an AttributeError because pytest was passing a coroutine object instead of the actual OAuthClientProvider instance to these tests. When the tests tried to access attributes like oauth_provider._current_tokens, they failed because coroutine objects don't have these attributes.
The fix was to make both tests async by:
Also noticed that out CI does not catch
ruff format
so adding it here