@@ -593,16 +593,20 @@ async def test_auth_flow_with_valid_tokens(self, oauth_provider, mock_storage, v
593593 "revocation_endpoint" ,
594594 ),
595595 (
596- # TODO(Marcelo): Since we are using `AnyUrl`, the trailing slash is always added.
597- # pytest.param(
598- # "https://auth.example.com",
599- # "https://auth.example.com/docs",
600- # "https://auth.example.com/authorize",
601- # "https://auth.example.com/token",
602- # "https://auth.example.com/register",
603- # "https://auth.example.com/revoke",
604- # id="simple-url",
605- # ),
596+ # Pydantic's AnyUrl incorrectly adds trailing slash to base URLs
597+ # This is being fixed in https://github.com/pydantic/pydantic-core/pull/1719 (Pydantic 2.12+)
598+ pytest .param (
599+ "https://auth.example.com" ,
600+ "https://auth.example.com/docs" ,
601+ "https://auth.example.com/authorize" ,
602+ "https://auth.example.com/token" ,
603+ "https://auth.example.com/register" ,
604+ "https://auth.example.com/revoke" ,
605+ id = "simple-url" ,
606+ marks = pytest .mark .xfail (
607+ reason = "Pydantic AnyUrl adds trailing slash to base URLs - fixed in Pydantic 2.12+"
608+ ),
609+ ),
606610 pytest .param (
607611 "https://auth.example.com/" ,
608612 "https://auth.example.com/docs" ,
0 commit comments