test(todos): schémas Pydantic + 9 tests d'intégration todos (en échec)

Ajoute les schémas Pydantic TodoCreate/TodoUpdate/PostponeRequest/TodoResponse,
la fixture db_session dans conftest, et 9 tests d'intégration contre PostgreSQL
réel — tous en échec car les endpoints /api/todos/ n'existent pas encore.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-24 09:13:58 +02:00
co-authored by Claude Sonnet 4.6
parent 53bb8bd27a
commit 3591972014
3 changed files with 165 additions and 0 deletions
+7
View File
@@ -1,9 +1,16 @@
import pytest
from httpx import AsyncClient, ASGITransport
from app.main import app
from app.core.database import AsyncSessionLocal
@pytest.fixture
async def client():
async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as ac:
yield ac
@pytest.fixture
async def db_session():
async with AsyncSessionLocal() as session:
yield session