Добавлены тесты для критических фиксов (lock_check, UniqueViolation, escName, idx_one_running)

This commit is contained in:
2026-07-31 18:28:49 +04:00
parent c1e7c4f9aa
commit 4d3ce74c03
5 changed files with 172 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
Pytest suite for critical regressions from audit rounds.
Covers:
- `/api/scenario/run` status mapping: `lock_check=None -> 503`, `False -> 409`.
- Unique violation on `scenario_runs` insert maps to `409`.
- `db.scenario_defs.lock_check` DB-unavailable semantics (`None`).
- Static guards for DB partial unique index and `escName` escape chain.
This suite is intentionally lightweight and mock-heavy.
No integration DB or external API calls are required.