First commit

This commit is contained in:
Johan
2025-12-19 10:07:55 +01:00
commit 0a1abf97f1
17 changed files with 2313 additions and 0 deletions

15
tests/conftest.py Normal file
View File

@@ -0,0 +1,15 @@
from typing import AsyncGenerator
import pytest
from httpx import AsyncClient, ASGITransport
from app.main import app
@pytest.fixture
async def test_client() -> AsyncGenerator[AsyncClient, None]:
# On crée un "transport" pour l'application ASGI
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://test") as client:
yield client
app.dependency_overrides.clear()