23 lines
777 B
Python
23 lines
777 B
Python
"""Checklist + report schema unit tests (ported from the stage-0 smoke test)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from contract_check.core.analysis.checklist import CHECKLIST, checklist_for_prompt
|
|
from contract_check.core.analysis.report_schema import ReportPayload
|
|
|
|
|
|
def test_checklist_has_10_items() -> None:
|
|
assert len(CHECKLIST) == 10
|
|
assert all(c.id and c.title and c.description for c in CHECKLIST)
|
|
|
|
|
|
def test_checklist_prompt_is_numbered_with_ids() -> None:
|
|
rendered = checklist_for_prompt()
|
|
assert "[penalties]" in rendered
|
|
assert rendered.count("\n") == 9
|
|
|
|
|
|
def test_report_payload_accepts_empty() -> None:
|
|
payload = ReportPayload()
|
|
assert payload.findings == []
|
|
assert "findings" in ReportPayload.model_json_schema()["properties"]
|