Skip to content

Commit 1891952

Browse files
committed
Fix asyncio tests
1 parent 2c998b8 commit 1891952

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/unit/ext/test_aiohttp_py35.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from dependency_injector import containers, providers
55
from dependency_injector.ext import aiohttp
66
from pytest import fixture, mark
7+
from pytest_asyncio import fixture as aio_fixture
78

89

910
async def index_view(_):
@@ -63,7 +64,7 @@ def app():
6364
return app
6465

6566

66-
@fixture
67+
@aio_fixture
6768
async def client(app):
6869
async with test_utils.TestClient(test_utils.TestServer(app)) as client:
6970
yield client

tests/unit/wiring/test_fastapi_py36.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from httpx import AsyncClient
22
from pytest import fixture, mark
3+
from pytest_asyncio import fixture as aio_fixture
34

45
# Runtime import to avoid syntax errors in samples on Python < 3.5 and reach top-dir
56
import os
@@ -16,7 +17,7 @@
1617
from wiringfastapi import web
1718

1819

19-
@fixture
20+
@aio_fixture
2021
async def async_client():
2122
client = AsyncClient(app=web.app, base_url="http://test")
2223
yield client

0 commit comments

Comments
 (0)