Skip to content

Commit 17e3fe4

Browse files
fix: tests
1 parent fb70e28 commit 17e3fe4

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

tests/client/test_auth.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,33 @@ def test_build_metadata(
13521352
"revocation_endpoint": Is(revocation_endpoint),
13531353
"revocation_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
13541354
"code_challenge_methods_supported": ["S256"],
1355-
"client_id_metadata_document_supported": Is(bool),
1355+
"client_id_metadata_document_supported": Is(False),
1356+
}
1357+
)
1358+
1359+
metadata = build_metadata(
1360+
issuer_url=AnyHttpUrl(issuer_url),
1361+
service_documentation_url=AnyHttpUrl(service_documentation_url),
1362+
client_registration_options=ClientRegistrationOptions(
1363+
enabled=True, valid_scopes=["read", "write", "admin"], client_id_metadata_document_supported=True
1364+
),
1365+
revocation_options=RevocationOptions(enabled=True),
1366+
)
1367+
1368+
assert metadata.model_dump(exclude_defaults=True, mode="json") == snapshot(
1369+
{
1370+
"issuer": Is(issuer_url),
1371+
"authorization_endpoint": Is(authorization_endpoint),
1372+
"token_endpoint": Is(token_endpoint),
1373+
"registration_endpoint": Is(registration_endpoint),
1374+
"scopes_supported": ["read", "write", "admin"],
1375+
"grant_types_supported": ["authorization_code", "refresh_token"],
1376+
"token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
1377+
"service_documentation": Is(service_documentation_url),
1378+
"revocation_endpoint": Is(revocation_endpoint),
1379+
"revocation_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
1380+
"code_challenge_methods_supported": ["S256"],
1381+
"client_id_metadata_document_supported": Is(True),
13561382
}
13571383
)
13581384

0 commit comments

Comments
 (0)