File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,20 +32,6 @@ insert ``pytest_plugins = 'aiohttp.pytest_plugin'`` line into
3232
3333
3434
35- Provisional Status
36- ~~~~~~~~~~~~~~~~~~
37-
38- The module is a **provisional **.
39-
40- *aiohttp * has a year and half period for removing deprecated API
41- (:ref: `aiohttp-backward-compatibility-policy `).
42-
43- But for :mod: `aiohttp.test_tools ` the deprecation period could be reduced.
44-
45- Moreover we may break *backward compatibility * without *deprecation
46- period * for some very strong reason.
47-
48-
4935The Test Client and Servers
5036~~~~~~~~~~~~~~~~~~~~~~~~~~~
5137
@@ -76,14 +62,19 @@ Pytest
7662The :data: `aiohttp_client ` fixture available from pytest-aiohttp _ plugin
7763allows you to create a client to make requests to test your app.
7864
79- A simple would be::
65+ To run these examples, you need to use `--asyncio-mode=auto ` or add to your
66+ pytest config file::
67+
68+ asyncio_mode = auto
69+
70+ A simple test would be::
8071
8172 from aiohttp import web
8273
8374 async def hello(request):
8475 return web.Response(text='Hello, world')
8576
86- async def test_hello(aiohttp_client, loop ):
77+ async def test_hello(aiohttp_client):
8778 app = web.Application()
8879 app.router.add_get('/', hello)
8980 client = await aiohttp_client(app)
You can’t perform that action at this time.
0 commit comments