Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tests/client/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async def test_init(self, oauth_provider, client_metadata, mock_storage):
assert oauth_provider.timeout == 300.0

@pytest.mark.anyio
def test_generate_code_verifier(self, oauth_provider):
async def test_generate_code_verifier(self, oauth_provider):
"""Test PKCE code verifier generation."""
verifier = oauth_provider._generate_code_verifier()

Expand All @@ -175,7 +175,7 @@ def test_generate_code_verifier(self, oauth_provider):
assert len(verifiers) == 10

@pytest.mark.anyio
def test_generate_code_challenge(self, oauth_provider):
async def test_generate_code_challenge(self, oauth_provider):
"""Test PKCE code challenge generation."""
verifier = "test_code_verifier_123"
challenge = oauth_provider._generate_code_challenge(verifier)
Expand All @@ -194,7 +194,7 @@ def test_generate_code_challenge(self, oauth_provider):
assert "/" not in challenge

@pytest.mark.anyio
def test_get_authorization_base_url(self, oauth_provider):
async def test_get_authorization_base_url(self, oauth_provider):
"""Test authorization base URL extraction."""
# Test with path
assert (
Expand Down Expand Up @@ -370,12 +370,12 @@ async def test_register_oauth_client_failure(self, oauth_provider):
)

@pytest.mark.anyio
def test_has_valid_token_no_token(self, oauth_provider):
async def test_has_valid_token_no_token(self, oauth_provider):
"""Test token validation with no token."""
assert not oauth_provider._has_valid_token()

@pytest.mark.anyio
def test_has_valid_token_valid(self, oauth_provider, oauth_token):
async def test_has_valid_token_valid(self, oauth_provider, oauth_token):
"""Test token validation with valid token."""
oauth_provider._current_tokens = oauth_token
oauth_provider._token_expiry_time = time.time() + 3600 # Future expiry
Expand Down Expand Up @@ -780,7 +780,7 @@ async def test_async_auth_flow_no_token(self, oauth_provider):
assert "Authorization" not in updated_request.headers

@pytest.mark.anyio
def test_scope_priority_client_metadata_first(
async def test_scope_priority_client_metadata_first(
self, oauth_provider, oauth_client_info
):
"""Test that client metadata scope takes priority."""
Expand Down Expand Up @@ -810,7 +810,7 @@ def test_scope_priority_client_metadata_first(
assert auth_params["scope"] == "read write"

@pytest.mark.anyio
def test_scope_priority_no_client_metadata_scope(
async def test_scope_priority_no_client_metadata_scope(
self, oauth_provider, oauth_client_info
):
"""Test that no scope parameter is set when client metadata has no scope."""
Expand Down