generated from coulomb/repo-seed
18 lines
586 B
Python
18 lines
586 B
Python
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)
|