|
10 | 10 |
|
11 | 11 | import httpx |
12 | 12 | import pytest |
13 | | -from inline_snapshot import snapshot |
| 13 | +from inline_snapshot import Is, snapshot |
14 | 14 | from pydantic import AnyHttpUrl, AnyUrl |
15 | 15 |
|
16 | 16 | from mcp.client.auth import OAuthClientProvider |
@@ -880,17 +880,17 @@ def test_build_metadata( |
880 | 880 | revocation_options=RevocationOptions(enabled=True), |
881 | 881 | ) |
882 | 882 |
|
883 | | - assert metadata.model_dump(exclude_defaults=True) == snapshot( |
| 883 | + assert metadata.model_dump(exclude_defaults=True, mode="json") == snapshot( |
884 | 884 | { |
885 | | - "issuer": AnyHttpUrl(issuer_url), |
886 | | - "authorization_endpoint": AnyHttpUrl(authorization_endpoint), |
887 | | - "token_endpoint": AnyHttpUrl(token_endpoint), |
888 | | - "registration_endpoint": AnyHttpUrl(registration_endpoint), |
| 885 | + "issuer": Is(issuer_url), |
| 886 | + "authorization_endpoint": Is(authorization_endpoint), |
| 887 | + "token_endpoint": Is(token_endpoint), |
| 888 | + "registration_endpoint": Is(registration_endpoint), |
889 | 889 | "scopes_supported": ["read", "write", "admin"], |
890 | 890 | "grant_types_supported": ["authorization_code", "refresh_token"], |
891 | 891 | "token_endpoint_auth_methods_supported": ["client_secret_post"], |
892 | | - "service_documentation": AnyHttpUrl(service_documentation_url), |
893 | | - "revocation_endpoint": AnyHttpUrl(revocation_endpoint), |
| 892 | + "service_documentation": Is(service_documentation_url), |
| 893 | + "revocation_endpoint": Is(revocation_endpoint), |
894 | 894 | "revocation_endpoint_auth_methods_supported": ["client_secret_post"], |
895 | 895 | "code_challenge_methods_supported": ["S256"], |
896 | 896 | } |
|
0 commit comments