feat: implement auth, projects, and frontend foundation
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
from importlib.util import module_from_spec, spec_from_file_location
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_initial_migration_defines_all_core_tables() -> None:
|
||||
migration_path = Path(__file__).resolve().parents[1] / "alembic" / "versions" / "0001_initial_schema.py"
|
||||
spec = spec_from_file_location("initial_schema", migration_path)
|
||||
|
||||
assert spec is not None
|
||||
assert spec.loader is not None
|
||||
|
||||
module = module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
|
||||
assert module.TABLE_NAMES == [
|
||||
"users",
|
||||
"ssh_keys",
|
||||
"projects",
|
||||
"git_repositories",
|
||||
"user_configs",
|
||||
]
|
||||
|
||||
|
||||
def test_refresh_tokens_migration_has_expected_revision_chain() -> None:
|
||||
migration_path = Path(__file__).resolve().parents[1] / "alembic" / "versions" / "0002_refresh_tokens.py"
|
||||
spec = spec_from_file_location("refresh_tokens", migration_path)
|
||||
|
||||
assert spec is not None
|
||||
assert spec.loader is not None
|
||||
|
||||
module = module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
|
||||
assert module.revision == "0002_refresh_tokens"
|
||||
assert module.down_revision == "0001_initial_schema"
|
||||
Reference in New Issue
Block a user