File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 4
4
from dependency_injector import containers , providers
5
5
from dependency_injector .ext import aiohttp
6
6
from pytest import fixture , mark
7
+ from pytest_asyncio import fixture as aio_fixture
7
8
8
9
9
10
async def index_view (_ ):
@@ -63,7 +64,7 @@ def app():
63
64
return app
64
65
65
66
66
- @fixture
67
+ @aio_fixture
67
68
async def client (app ):
68
69
async with test_utils .TestClient (test_utils .TestServer (app )) as client :
69
70
yield client
Original file line number Diff line number Diff line change 1
1
from httpx import AsyncClient
2
2
from pytest import fixture , mark
3
+ from pytest_asyncio import fixture as aio_fixture
3
4
4
5
# Runtime import to avoid syntax errors in samples on Python < 3.5 and reach top-dir
5
6
import os
16
17
from wiringfastapi import web
17
18
18
19
19
- @fixture
20
+ @aio_fixture
20
21
async def async_client ():
21
22
client = AsyncClient (app = web .app , base_url = "http://test" )
22
23
yield client
You can’t perform that action at this time.
0 commit comments