Files
linkedstorm/tests/routes/conftest.py
T
pluto 4def6a526c feat: utterances API routes — list, clip, tag, dismiss
Adds app/api/main.py (create_app factory with health endpoint), utterances
router (GET /api/utterances with date/room/speaker/status filters, GET clip,
POST tag, POST dismiss), stub routers for speakers/rooms/search/rag, and
tests/routes/ with 6 passing TDD tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 10:43:22 -05:00

19 lines
454 B
Python

import pytest
from fastapi.testclient import TestClient
@pytest.fixture
def api_client(settings):
from app.api.main import create_app
app = create_app(settings)
return TestClient(app)
@pytest.fixture
def seeded_db(db):
"""DB with a room and speaker pre-inserted."""
db.execute("INSERT INTO rooms (name) VALUES (?)", ("Kitchen",))
db.execute("INSERT INTO speakers (name) VALUES (?)", ("Jeremy",))
db.commit()
return db