Skip to content

Commit c65b029

Browse files
committed
test(auth): expect build_metadata issuer without trailing slash
Remove the Pydantic AnyUrl xfail now that routes.strip trailing slashes, and assert issuer against the canonical form.
1 parent 7812ee3 commit c65b029

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

tests/client/test_auth.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,9 +1529,6 @@ async def mock_callback() -> AuthorizationCodeResult:
15291529
"https://auth.example.com/register",
15301530
"https://auth.example.com/revoke",
15311531
id="simple-url",
1532-
marks=pytest.mark.xfail(
1533-
reason="Pydantic AnyUrl adds trailing slash to base URLs - fixed in Pydantic 2.12+"
1534-
),
15351532
),
15361533
pytest.param(
15371534
"https://auth.example.com/",
@@ -1570,7 +1567,7 @@ def test_build_metadata(
15701567

15711568
assert metadata.model_dump(exclude_defaults=True, mode="json") == snapshot(
15721569
{
1573-
"issuer": Is(issuer_url),
1570+
"issuer": Is(issuer_url.rstrip("/")),
15741571
"authorization_endpoint": Is(authorization_endpoint),
15751572
"token_endpoint": Is(token_endpoint),
15761573
"registration_endpoint": Is(registration_endpoint),

0 commit comments

Comments
 (0)