From c89fee20ecaea90df38eef18a84413cb33a9aa9e Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 22 Aug 2026 16:55:00 +0200 Subject: [PATCH] Pin the accepted Google issuers with literals, not the module's own constant While trimming that file under the cap I had rewritten the parametrize as `[*lg._EXPECTED_ISSUERS]`, which asserts only that the module agrees with itself: deleting a spelling from _EXPECTED_ISSUERS would have removed the case that tests it and left the suite green. Confirmed by mutation rather than by inspection -- dropping the bare "accounts.google.com" from the module now fails test_both_google_issuer_spellings_are_accepted[accounts.google.com], where before it would have passed. Google uses both forms, so accepting both is a real contract worth pinning. 432 passed, still 100%, verified with HOME redirected at a temp directory. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG --- crdt-sync/crdt_sync/tests/test_tool_link_google_token.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crdt-sync/crdt_sync/tests/test_tool_link_google_token.py b/crdt-sync/crdt_sync/tests/test_tool_link_google_token.py index 7a439a2..8fcf7b6 100644 --- a/crdt-sync/crdt_sync/tests/test_tool_link_google_token.py +++ b/crdt-sync/crdt_sync/tests/test_tool_link_google_token.py @@ -49,7 +49,9 @@ def test_a_token_from_another_issuer_is_rejected() -> None: lg.describe_google_token(_google_token(iss="https://login.example.com")) -@pytest.mark.parametrize("issuer", [*lg._EXPECTED_ISSUERS]) +@pytest.mark.parametrize( + "issuer", ["https://accounts.google.com", "accounts.google.com"] +) def test_both_google_issuer_spellings_are_accepted(issuer: str) -> None: """Google uses both forms; rejecting either would be a false alarm.""" assert "person@gmail.com" in lg.describe_google_token(_google_token(iss=issuer))