Fix callback-prune test fixture for the post-prune declaration
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 4s

bcf6f9b updated the role declaration to the pruned live state; the test
modelled the pre-prune role from that file and no longer did. All 377 pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 150322@bnt-lap001
Assistant-Session: 16a7b788-374e-4915-a1df-fc87ffd9a5e4
This commit is contained in:
codex 2026-09-24 01:16:08 +02:00
parent bcf6f9bf12
commit c9bf8c90c9

View file

@ -24,8 +24,8 @@ def live(role):
def test_prunes_only_the_two_retired_callbacks_and_keeps_settings():
role = dict(DECLARED, allowed_redirect_uris=list(DECLARED['allowed_redirect_uris']) + list(m.RETIRED)
if not set(m.RETIRED) <= set(DECLARED['allowed_redirect_uris']) else list(DECLARED['allowed_redirect_uris']))
# The declaration is post-prune; re-add the retired callbacks to model the pre-prune role.
role = dict(DECLARED, allowed_redirect_uris=list(DECLARED['allowed_redirect_uris']) + list(m.RETIRED))
state, writes, read, write = live(role)
changed, uris = m.prune(read, write)
assert changed and len(writes) == 1
@ -50,7 +50,7 @@ def test_refuses_without_tunnel_callback():
def test_refuses_when_readback_drops_other_settings():
role = copy.deepcopy(DECLARED)
role = dict(copy.deepcopy(DECLARED), allowed_redirect_uris=list(DECLARED['allowed_redirect_uris']) + list(m.RETIRED))
calls = iter([copy.deepcopy(role), copy.deepcopy(role),
dict(copy.deepcopy(role), token_ttl=60,
allowed_redirect_uris=[u for u in role['allowed_redirect_uris'] if u not in m.RETIRED])])