(create_app_and_client, loop)
| 414 | |
| 415 | @pytest.mark.run_loop |
| 416 | def test_wait_for(create_app_and_client, loop): |
| 417 | @asyncio.coroutine |
| 418 | def handler(request): |
| 419 | return web.Response(body=b'OK') |
| 420 | |
| 421 | app, client = yield from create_app_and_client() |
| 422 | app.router.add_route('GET', '/', handler) |
| 423 | resp = yield from asyncio.wait_for(client.get('/'), 10, loop=loop) |
| 424 | assert resp.status == 200 |
| 425 | txt = yield from resp.text() |
| 426 | assert txt == 'OK' |
| 427 | |
| 428 | |
| 429 | @pytest.mark.run_loop |
nothing calls this directly
no test coverage detected