fix(ci): frontend lint to zero errors + dev-deps installable on clean image #149
@@ -16,6 +16,14 @@ from app.main import app
|
|||||||
from app.core.database import Base, get_db
|
from app.core.database import Base, get_db
|
||||||
from app.core.admin_database import get_admin_db
|
from app.core.admin_database import get_admin_db
|
||||||
from app.core.config import settings
|
from app.core.config import settings
|
||||||
|
# Import every model module so all tables are registered with Base.metadata
|
||||||
|
# before the test_db fixture calls create_all. app.main imports models lazily
|
||||||
|
# (inside scheduler functions and route modules), which is fine at runtime
|
||||||
|
# but leaves the metadata incomplete at fixture-setup time — surfacing as
|
||||||
|
# "relation X does not exist" errors for any model whose route/scheduler
|
||||||
|
# hasn't been loaded yet. The `from app import models` form avoids
|
||||||
|
# shadowing the `app` FastAPI instance imported just above.
|
||||||
|
from app import models as _models # noqa: F401
|
||||||
|
|
||||||
# Disable invite code requirement for tests
|
# Disable invite code requirement for tests
|
||||||
settings.REQUIRE_INVITE_CODE = False
|
settings.REQUIRE_INVITE_CODE = False
|
||||||
|
|||||||
Reference in New Issue
Block a user