"""Performance smoke — tenant-scoped list indexes exist."""
from app.core.database import Base
import app.models  # noqa: F401


def test_venues_have_tenant_indexes():
    table = Base.metadata.tables["venues"]
    index_cols = {tuple(idx.columns.keys()) for idx in table.indexes}
    assert ("tenant_id", "status") in index_cols or any(
        "tenant_id" in cols for cols in index_cols
    )


def test_tenant_bundles_have_status_index():
    table = Base.metadata.tables["tenant_bundles"]
    assert any("tenant_id" in idx.columns.keys() for idx in table.indexes)
