Open
Description
Describe the bug
Two test methods in test_auth.py
are using the async oauth_provider
fixture but are not marked as async tests, causing AttributeError failures.
To Reproduce
Steps to reproduce the behavior:
- Run the test suite with
pytest tests/client/test_auth.py
- Observe failures for:
test_scope_priority_client_metadata_first
test_scope_priority_no_client_metadata_scope
- See error:
AttributeError: 'coroutine' object has no attribute 'client_metadata'
Expected behavior
Tests should run successfully without AttributeError when using async fixtures.
Screenshots
Error output:
AttributeError: 'coroutine' object has no attribute 'client_metadata'
Environment:
- OS: Cross-platform issue
- Python version: 3.10+
- Package version: Current main branch
Additional context
- These tests use the async
oauth_provider
fixture but are synchronous methods - The solution is to add
@pytest.mark.anyio
decorator and convert methods toasync def
- This follows the pattern established in commit 9dad266
- Note: CI currently has
continue-on-error: true
for tests, which prevented this from being caught automatically
Metadata
Metadata
Assignees
Labels
No labels