Files
app-autotest/tests
naeel b89c0138e4 test: +13 тестов — save_run UPSERT, auth режимы/URL, сценарии
test_db_save_run.py (4 теста): INSERT/UPDATE/UPSERT/без БД
test_auth.py (9 тестов): URL полигона, get_stand, whitelist, режимы
test_scenario_full.py (8 тестов): CRUD + запуск (требует polygon + БД)

Итого: 35 тестов (22 старых + 13 новых)
2026-08-04 08:48:36 +04:00
..

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.