|
6 | 6 |
|
7 | 7 | import httpx
|
8 | 8 | import pytest
|
9 |
| -from inline_snapshot import snapshot |
| 9 | +from inline_snapshot import Is, snapshot |
10 | 10 | from pydantic import AnyHttpUrl, AnyUrl
|
11 | 11 |
|
12 | 12 | from mcp.client.auth import OAuthClientProvider, PKCEParameters
|
@@ -639,17 +639,17 @@ def test_build_metadata(
|
639 | 639 | revocation_options=RevocationOptions(enabled=True),
|
640 | 640 | )
|
641 | 641 |
|
642 |
| - assert metadata.model_dump(exclude_defaults=True) == snapshot( |
| 642 | + assert metadata.model_dump(exclude_defaults=True, mode="json") == snapshot( |
643 | 643 | {
|
644 |
| - "issuer": AnyHttpUrl(issuer_url), |
645 |
| - "authorization_endpoint": AnyHttpUrl(authorization_endpoint), |
646 |
| - "token_endpoint": AnyHttpUrl(token_endpoint), |
647 |
| - "registration_endpoint": AnyHttpUrl(registration_endpoint), |
| 644 | + "issuer": Is(issuer_url), |
| 645 | + "authorization_endpoint": Is(authorization_endpoint), |
| 646 | + "token_endpoint": Is(token_endpoint), |
| 647 | + "registration_endpoint": Is(registration_endpoint), |
648 | 648 | "scopes_supported": ["read", "write", "admin"],
|
649 | 649 | "grant_types_supported": ["authorization_code", "refresh_token"],
|
650 | 650 | "token_endpoint_auth_methods_supported": ["client_secret_post"],
|
651 |
| - "service_documentation": AnyHttpUrl(service_documentation_url), |
652 |
| - "revocation_endpoint": AnyHttpUrl(revocation_endpoint), |
| 651 | + "service_documentation": Is(service_documentation_url), |
| 652 | + "revocation_endpoint": Is(revocation_endpoint), |
653 | 653 | "revocation_endpoint_auth_methods_supported": ["client_secret_post"],
|
654 | 654 | "code_challenge_methods_supported": ["S256"],
|
655 | 655 | }
|
|
0 commit comments