Public Access
feat: manual match pin/unpin endpoints
This commit is contained in:
@@ -155,6 +155,19 @@ def db(_engine):
|
||||
connection.close()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def db_session():
|
||||
"""Plain SessionLocal for tests that need to seed data outside the
|
||||
transactional ``db`` fixture (e.g. setting up rows the API will read)."""
|
||||
from app.database import SessionLocal
|
||||
|
||||
s = SessionLocal()
|
||||
try:
|
||||
yield s
|
||||
finally:
|
||||
s.close()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def client(db):
|
||||
"""TestClient with get_db overridden to yield the test session."""
|
||||
|
||||
Reference in New Issue
Block a user