This repository has been archived on 2026-07-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
core-hub/tests/test_database.py

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)