initial commit

This commit is contained in:
2023-10-03 22:13:42 +01:00
commit 79ba18e15f
17 changed files with 1110 additions and 0 deletions

24
tests/conftest.py Normal file
View File

@@ -0,0 +1,24 @@
import pytest
from fastapi import FastAPI
from httpx import AsyncClient
from asgi_lifespan import LifespanManager
from request_coalescing_py.main import app
from request_coalescing_py.models import Item
@pytest.fixture
def anyio_backend() -> str:
return "asyncio"
@pytest.fixture(scope="function")
async def test_app() -> FastAPI:
async with LifespanManager(app) as manager:
yield manager.app
@pytest.fixture(scope="function")
async def client(test_app) -> AsyncClient:
async with AsyncClient(app=test_app, base_url="http://test") as client:
yield client