41 lines
1.7 KiB
Python
41 lines
1.7 KiB
Python
|
|
from pathlib import Path
|
||
|
|
import json
|
||
|
|
|
||
|
|
from informed_decision.records import memo_from
|
||
|
|
|
||
|
|
ROOT = Path(__file__).resolve().parents[1] / "docs" / "batches" / "2026-09-14"
|
||
|
|
|
||
|
|
|
||
|
|
def test_sitting_has_two_unsigned_batches_of_four():
|
||
|
|
sitting = json.loads((ROOT / "sitting.json").read_text())
|
||
|
|
assert sitting["status"] == "draft-unsigned"
|
||
|
|
assert sitting["review_group"] == "net-kingdom-admins"
|
||
|
|
assert sitting["memo_count"] == 8
|
||
|
|
assert sitting.get("submitted") is not True
|
||
|
|
|
||
|
|
|
||
|
|
def test_each_memo_is_one_question_with_required_highlight_and_workplan_trace():
|
||
|
|
questions = set()
|
||
|
|
for name in ("credentials", "decisions"):
|
||
|
|
index = json.loads((ROOT / name / "index.json").read_text())
|
||
|
|
assert index["one_question_per_memo"] is True
|
||
|
|
assert index["approve_all_forbidden"] is True
|
||
|
|
assert index["agent_disposition_forbidden"] is True
|
||
|
|
assert index["submitted"] is False
|
||
|
|
assert len(index["ordinal"]) == 4
|
||
|
|
for row in index["ordinal"]:
|
||
|
|
memo = memo_from(json.loads((ROOT / name / row["memo"]).read_text()))
|
||
|
|
assert memo.question == row["question"]
|
||
|
|
assert memo.question not in questions
|
||
|
|
questions.add(memo.question)
|
||
|
|
assert memo.requested_act == "approve"
|
||
|
|
assert memo.approval_id is None
|
||
|
|
assert row["required_highlight"] in memo.required_ack_ids
|
||
|
|
assert row["workplan"]
|
||
|
|
assert row["hub_task_prefix"]
|
||
|
|
packet = (ROOT / name / row["packet"]).read_text()
|
||
|
|
assert "password" not in packet.lower()
|
||
|
|
assert "secret_id" not in packet.lower()
|
||
|
|
assert row["workplan"] in packet
|
||
|
|
assert len(questions) == 8
|