MCPcopy Create free account
hub / github.com/fastapi/full-stack-fastapi-template / db

Function db

backend/tests/conftest.py:16–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15@pytest.fixture(scope="session", autouse=True)
16def db() -> Generator[Session, None, None]:
17 with Session(engine) as session:
18 init_db(session)
19 yield session
20 statement = delete(Item)
21 session.execute(statement)
22 statement = delete(User)
23 session.execute(statement)
24 session.commit()
25
26
27@pytest.fixture(scope="module")

Callers

nothing calls this directly

Calls 1

init_dbFunction · 0.90

Tested by

no test coverage detected