Skip to content

Commit 4a6fbd3

Browse files
tests: mark trailing slash test as xfail (#1138)
1 parent 91722aa commit 4a6fbd3

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

tests/client/test_auth.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -836,16 +836,20 @@ async def test_token_exchange_error_basic(self, oauth_provider, oauth_client_inf
836836
"revocation_endpoint",
837837
),
838838
(
839-
# TODO(Marcelo): Since we are using `AnyUrl`, the trailing slash is always added.
840-
# pytest.param(
841-
# "https://auth.example.com",
842-
# "https://auth.example.com/docs",
843-
# "https://auth.example.com/authorize",
844-
# "https://auth.example.com/token",
845-
# "https://auth.example.com/register",
846-
# "https://auth.example.com/revoke",
847-
# id="simple-url",
848-
# ),
839+
# Pydantic's AnyUrl incorrectly adds trailing slash to base URLs
840+
# This is being fixed in https://github.com/pydantic/pydantic-core/pull/1719 (Pydantic 2.12+)
841+
pytest.param(
842+
"https://auth.example.com",
843+
"https://auth.example.com/docs",
844+
"https://auth.example.com/authorize",
845+
"https://auth.example.com/token",
846+
"https://auth.example.com/register",
847+
"https://auth.example.com/revoke",
848+
id="simple-url",
849+
marks=pytest.mark.xfail(
850+
reason="Pydantic AnyUrl adds trailing slash to base URLs - fixed in Pydantic 2.12+"
851+
),
852+
),
849853
pytest.param(
850854
"https://auth.example.com/",
851855
"https://auth.example.com/docs",

0 commit comments

Comments
 (0)