|
8 | 8 |
|
9 | 9 | import base64 |
10 | 10 | from collections import Counter |
| 11 | +from typing import cast |
11 | 12 | from urllib.parse import parse_qsl, urlsplit |
12 | 13 |
|
13 | 14 | import anyio |
@@ -69,7 +70,7 @@ def path_counts(recorded: list[RecordedRequest]) -> Counter[tuple[str, str]]: |
69 | 70 | def cimd_supported_metadata() -> bytes: |
70 | 71 | """AS metadata advertising `client_id_metadata_document_supported: true` (the SDK server never sets it).""" |
71 | 72 | metadata = OAuthMetadata( |
72 | | - issuer=AnyHttpUrl(f"{BASE_URL}/"), |
| 73 | + issuer=cast(AnyHttpUrl, BASE_URL), |
73 | 74 | authorization_endpoint=AnyHttpUrl(f"{BASE_URL}/authorize"), |
74 | 75 | token_endpoint=AnyHttpUrl(f"{BASE_URL}/token"), |
75 | 76 | registration_endpoint=AnyHttpUrl(f"{BASE_URL}/register"), |
@@ -239,7 +240,7 @@ async def test_credentials_bound_to_a_different_issuer_are_discarded_and_the_cli |
239 | 240 | # The persisted client is now bound to the current AS. |
240 | 241 | assert storage.client_info is not None |
241 | 242 | assert storage.client_info.client_id != "stale-as-client" |
242 | | - assert storage.client_info.issuer == f"{BASE_URL}/" |
| 243 | + assert storage.client_info.issuer == BASE_URL |
243 | 244 |
|
244 | 245 |
|
245 | 246 | @requirement("client-auth:401-after-auth-throws") |
@@ -437,7 +438,7 @@ async def assertion_provider(audience: str) -> str: |
437 | 438 | result = await client.list_tools() |
438 | 439 |
|
439 | 440 | assert result.tools[0].name == "echo" |
440 | | - assert audiences == [f"{BASE_URL}/"] |
| 441 | + assert audiences == [BASE_URL] |
441 | 442 |
|
442 | 443 | [token_req] = find(recorded, "POST", "/token") |
443 | 444 | body = form_body(token_req) |
|
0 commit comments