|
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,18 +880,18 @@ def test_build_metadata( |
880 | 880 | revocation_options=RevocationOptions(enabled=True), |
881 | 881 | ) |
882 | 882 |
|
883 | | - assert metadata == snapshot( |
884 | | - OAuthMetadata( |
885 | | - issuer=AnyHttpUrl(issuer_url), |
886 | | - authorization_endpoint=AnyHttpUrl(authorization_endpoint), |
887 | | - token_endpoint=AnyHttpUrl(token_endpoint), |
888 | | - registration_endpoint=AnyHttpUrl(registration_endpoint), |
889 | | - scopes_supported=["read", "write", "admin"], |
890 | | - grant_types_supported=["authorization_code", "refresh_token"], |
891 | | - token_endpoint_auth_methods_supported=["client_secret_post"], |
892 | | - service_documentation=AnyHttpUrl(service_documentation_url), |
893 | | - revocation_endpoint=AnyHttpUrl(revocation_endpoint), |
894 | | - revocation_endpoint_auth_methods_supported=["client_secret_post"], |
895 | | - code_challenge_methods_supported=["S256"], |
896 | | - ) |
| 883 | + assert metadata.model_dump(exclude_defaults=True) == snapshot( |
| 884 | + { |
| 885 | + "issuer": Is(AnyHttpUrl(issuer_url)), |
| 886 | + "authorization_endpoint": Is(AnyHttpUrl(authorization_endpoint)), |
| 887 | + "token_endpoint": Is(AnyHttpUrl(token_endpoint)), |
| 888 | + "registration_endpoint": Is(AnyHttpUrl(registration_endpoint)), |
| 889 | + "scopes_supported": ["read", "write", "admin"], |
| 890 | + "grant_types_supported": ["authorization_code", "refresh_token"], |
| 891 | + "token_endpoint_auth_methods_supported": ["client_secret_post"], |
| 892 | + "service_documentation": Is(AnyHttpUrl(service_documentation_url)), |
| 893 | + "revocation_endpoint": Is(AnyHttpUrl(revocation_endpoint)), |
| 894 | + "revocation_endpoint_auth_methods_supported": ["client_secret_post"], |
| 895 | + "code_challenge_methods_supported": ["S256"], |
| 896 | + } |
897 | 897 | ) |
0 commit comments