test: align scoring fixtures and upgrade checks with current contracts

This commit is contained in:
2026-10-17 20:50:48 +08:00
parent a5cb40f83d
commit f7db0a47ac
3 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -428,13 +428,14 @@ def test_project_and_version_isolation_is_unchanged(db):
def test_batch_snapshot_records_the_evidence_policy(db):
from types import SimpleNamespace
from wisegrade import services
from wisegrade.evidence import POLICY_VERSION
from wisegrade.models import ScoringBatch
created = services.create_batch(SimpleNamespace(course_version_id=1, rubric_version_id=1), db)
assert created["id"]
batch = db.get(ScoringBatch, created["id"])
plan = batch.rubric_snapshot["evidence_plan"]
assert plan["version"] == 1
assert plan["version"] == POLICY_VERSION
assert plan["content_allowed_page_types"] == ["body", "appendix"]
targets = plan["criteria"]["stage3.data"]
assert [target["use"] for target in targets] == ["content", "content"]