Skip to content

Commit 1517e4b

Browse files
committed
fixes
1 parent 09ef708 commit 1517e4b

File tree

2 files changed

+882
-909
lines changed

2 files changed

+882
-909
lines changed

tests/client/test_auth.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,33 +1059,6 @@ async def test_fallback_to_oauth_metadata_scopes_when_no_prm_scopes(
10591059
# Verify that OAuth metadata scopes are used as fallback
10601060
assert provider.context.client_metadata.scope == "read write admin"
10611061

1062-
@pytest.mark.anyio
1063-
async def test_fallback_to_oauth_metadata_scopes_when_no_prm(
1064-
self, oauth_provider_without_scope: OAuthClientProvider
1065-
):
1066-
"""Test fallback to OAuth metadata scopes when no PRM is available."""
1067-
provider = oauth_provider_without_scope
1068-
1069-
# No PRM metadata set
1070-
1071-
# Create OAuth metadata response with scopes
1072-
oauth_metadata_response = httpx.Response(
1073-
200,
1074-
content=(
1075-
b'{"issuer": "https://auth.example.com", '
1076-
b'"authorization_endpoint": "https://auth.example.com/authorize", '
1077-
b'"token_endpoint": "https://auth.example.com/token", '
1078-
b'"registration_endpoint": "https://auth.example.com/register", '
1079-
b'"scopes_supported": ["read", "write", "admin"]}'
1080-
),
1081-
)
1082-
1083-
# Process the OAuth metadata
1084-
await provider._handle_oauth_metadata_response(oauth_metadata_response)
1085-
1086-
# Verify that OAuth metadata scopes are used
1087-
assert provider.context.client_metadata.scope == "read write admin"
1088-
10891062
@pytest.mark.anyio
10901063
async def test_no_scope_changes_when_both_missing(self, oauth_provider_without_scope: OAuthClientProvider):
10911064
"""Test that no scope changes occur when both PRM and OAuth metadata lack scopes."""

0 commit comments

Comments
 (0)