diff --git a/backend/app/tasks/router.py b/backend/app/tasks/router.py index 3fca8df6..8a75c476 100644 --- a/backend/app/tasks/router.py +++ b/backend/app/tasks/router.py @@ -22,8 +22,6 @@ from backend.app.db.models.tasks import SourceEnum, Task, SubTask from sqlalchemy.orm import Session from sqlalchemy import select -# from sqlmodel import Session, select - router = APIRouter( prefix="/tasks", diff --git a/backend/conftest.py b/backend/conftest.py index 5eba00ea..df7d9cd6 100644 --- a/backend/conftest.py +++ b/backend/conftest.py @@ -25,7 +25,8 @@ def engine(postgresql): engine = create_engine(connection_string) # Create tables once per test session - # Base.metadata.create_all(engine) + Base.metadata.create_all(engine) + SQLModel.metadata.create_all(engine) # Yeild will split this function into two phase. 1) setup and 2) teardown, the latter of which will run after all # tests have completed @@ -47,9 +48,6 @@ def db_session(engine): connection = engine.connect() transaction = connection.begin() - Base.metadata.create_all(bind=connection) - SQLModel.metadata.create_all(bind=connection) - session = sessionmaker(bind=connection)() yield session