Files
clientflow_backend/tests/test_clean_architecture_static.py
2026-06-09 22:55:58 +01:00

39 lines
1.1 KiB
Python

from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
LEGACY_ACTION_CODES = {
"CONFIRM_PAYMENT_AND_PREPARE_SHIPMENT",
"CHECK_SHIPMENT_STATUS",
"CHECK_MISSING_MATERIAL",
"HANDLE_TECHNICAL_SUPPORT",
"HANDLE_WARRANTY_SUPPORT",
"PREPARE_ORDER",
"VALIDATE_SHIPMENT",
"FOLLOW_UP_INFO",
"CONTACT_CLIENT",
"SCHEDULE_MEETING",
}
def test_action_catalog_contains_only_current_triage_codes():
text = (ROOT / "app" / "action_catalog.py").read_text()
for code in LEGACY_ACTION_CODES:
assert code not in text
def test_no_absolute_dashboard_paths():
text = (ROOT / "app" / "admin_dashboard.py").read_text()
assert "/mnt/ssd/home/plx/clientflow_backend" not in text
assert "/mnt/ssd/backups/clientflow" not in text
def test_task_preparations_schema_exists():
text = (ROOT / "app" / "db.py").read_text()
assert "CREATE TABLE IF NOT EXISTS task_preparations" in text
def test_sqlite_default_removed():
text = (ROOT / "app" / "config.py").read_text()
assert "sqlite:///" not in text
assert "database_url: str" in text