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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user