pre-review tidyup

This commit is contained in:
Daniel Roth 2026-03-18 16:30:20 +00:00
parent a1dba64e51
commit 33a237104c
2 changed files with 2 additions and 6 deletions

View file

@ -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",

View file

@ -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