4def6a526c
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>
19 lines
454 B
Python
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
|