diff --git a/tests/client/test_auth.py b/tests/client/test_auth.py index be8f008e0..c9133d35c 100644 --- a/tests/client/test_auth.py +++ b/tests/client/test_auth.py @@ -836,16 +836,20 @@ async def test_token_exchange_error_basic(self, oauth_provider, oauth_client_inf "revocation_endpoint", ), ( - # TODO(Marcelo): Since we are using `AnyUrl`, the trailing slash is always added. - # pytest.param( - # "https://auth.example.com", - # "https://auth.example.com/docs", - # "https://auth.example.com/authorize", - # "https://auth.example.com/token", - # "https://auth.example.com/register", - # "https://auth.example.com/revoke", - # id="simple-url", - # ), + # Pydantic's AnyUrl incorrectly adds trailing slash to base URLs + # This is being fixed in https://github.com/pydantic/pydantic-core/pull/1719 (Pydantic 2.12+) + pytest.param( + "https://auth.example.com", + "https://auth.example.com/docs", + "https://auth.example.com/authorize", + "https://auth.example.com/token", + "https://auth.example.com/register", + "https://auth.example.com/revoke", + id="simple-url", + marks=pytest.mark.xfail( + reason="Pydantic AnyUrl adds trailing slash to base URLs - fixed in Pydantic 2.12+" + ), + ), pytest.param( "https://auth.example.com/", "https://auth.example.com/docs",