generated from coulomb/repo-seed
Start Core Hub FastAPI replacement foundation
This commit is contained in:
17
tests/test_database.py
Normal file
17
tests/test_database.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from sqlalchemy import inspect
|
||||
|
||||
import core_hub.models # noqa: F401
|
||||
from core_hub.db import Base
|
||||
|
||||
|
||||
def test_metadata_contains_foundation_tables():
|
||||
assert {"hubs", "hub_capability_manifests", "api_consumers"}.issubset(Base.metadata.tables)
|
||||
|
||||
|
||||
async def test_sqlite_fixture_creates_foundation_tables(sqlite_engine):
|
||||
async with sqlite_engine.connect() as connection:
|
||||
table_names = await connection.run_sync(
|
||||
lambda sync_conn: inspect(sync_conn).get_table_names()
|
||||
)
|
||||
|
||||
assert {"hubs", "hub_capability_manifests", "api_consumers"}.issubset(table_names)
|
||||
Reference in New Issue
Block a user