Cover WH-ENG-20260822-AUDIT-E2-02 fixtures and window gates
The retry record is distinct from the expired -01 identifiers and is only authorized inside 19:15Z-19:30Z. Assistant: grok Assistant-Session: 01a02670-3345-76f2-a014-70fde8e2a2bb
This commit is contained in:
parent
e1f9f81d15
commit
b6c1806680
2 changed files with 32 additions and 0 deletions
|
|
@ -63,6 +63,16 @@ def test_pending_owner_acknowledgement_fails_closed(tmp_path):
|
|||
load(tmp_path, data)
|
||||
|
||||
|
||||
def test_retry_record_is_authorized_only_inside_its_window():
|
||||
path = "engagements/2026-08-22-audit-core-e2-02.json"
|
||||
with pytest.raises(AuthorizationError, match="has not started"):
|
||||
Engagement.load(path, now=datetime(2026, 8, 22, 19, 14, tzinfo=UTC))
|
||||
engagement = Engagement.load(path, now=datetime(2026, 8, 22, 19, 15, tzinfo=UTC))
|
||||
assert engagement.raw["engagement_id"] == "WH-ENG-20260822-AUDIT-E2-02"
|
||||
with pytest.raises(AuthorizationError, match="outside"):
|
||||
Engagement.load(path, now=datetime(2026, 8, 22, 19, 31, tzinfo=UTC))
|
||||
|
||||
|
||||
def test_elapsed_record_fails_closed_even_inside_old_window(tmp_path):
|
||||
data = record()
|
||||
data["status"] = "expired"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue