Skip to content

Commit c236d3a

Browse files
[PR #8457/db1b9129 backport][3.9] Use async fixture in testing docs (#8460)
**This is a backport of PR #8457 as merged into master (db1b912).** Co-authored-by: Sam Bull <[email protected]>
1 parent e4a63ff commit c236d3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/testing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ app test client::
111111
body='value: {}'.format(request.app[value]).encode('utf-8'))
112112

113113
@pytest.fixture
114-
def cli(loop, aiohttp_client):
114+
async def cli(aiohttp_client):
115115
app = web.Application()
116116
app.router.add_get('/', previous)
117117
app.router.add_post('/', previous)
118-
return loop.run_until_complete(aiohttp_client(app))
118+
return await aiohttp_client(app)
119119

120120
async def test_set_value(cli):
121121
resp = await cli.post('/', data={'value': 'foo'})

0 commit comments

Comments
 (0)