@@ -836,16 +836,20 @@ async def test_token_exchange_error_basic(self, oauth_provider, oauth_client_inf
836
836
"revocation_endpoint" ,
837
837
),
838
838
(
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
+ ),
849
853
pytest .param (
850
854
"https://auth.example.com/" ,
851
855
"https://auth.example.com/docs" ,