mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-25 02:53:56 +03:00
Update fastapi-simple example
This commit is contained in:
parent
14744e4b70
commit
485d6e7179
|
@ -7,10 +7,9 @@ from fastapi_di_example import app, container, Service
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def client(event_loop):
|
async def client(event_loop):
|
||||||
client = AsyncClient(app=app, base_url="http://test")
|
async with AsyncClient(app=app, base_url="http://test") as client:
|
||||||
yield client
|
yield client
|
||||||
event_loop.run_until_complete(client.aclose())
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
|
Loading…
Reference in New Issue
Block a user