18 lines
580 B
Python
18 lines
580 B
Python
from pathlib import Path
|
|
|
|
|
|
def test_is_locked_migration_is_idempotent():
|
|
source = Path("alembic/versions/20260116_01_add_is_locked_to_studies.py").read_text(encoding="utf-8")
|
|
|
|
assert 'if "is_locked" not in columns:' in source
|
|
assert 'if "is_locked" in columns:' in source
|
|
|
|
|
|
def test_migration_state_check_script_exists():
|
|
source = Path("scripts/check_migration_state.py").read_text(encoding="utf-8")
|
|
|
|
assert "missing alembic_version table" in source
|
|
assert "studies" in source
|
|
assert "subjects" in source
|
|
assert "monitoring_visit_issues" in source
|