Files
home_hub/backend/tests/conftest.py
T
gilles 3591972014 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>
2026-05-24 09:13:58 +02:00

17 lines
390 B
Python

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