(make_srv, loop)
| 393 | |
| 394 | |
| 395 | def test_handle_cancel(make_srv, loop): |
| 396 | log = mock.Mock() |
| 397 | transport = mock.Mock() |
| 398 | |
| 399 | srv = make_srv(logger=log, debug=True) |
| 400 | srv.connection_made(transport) |
| 401 | srv.writer = mock.Mock() |
| 402 | srv.handle_request = mock.Mock() |
| 403 | |
| 404 | @asyncio.coroutine |
| 405 | def cancel(): |
| 406 | srv._request_handler.cancel() |
| 407 | |
| 408 | loop.run_until_complete( |
| 409 | asyncio.wait([srv._request_handler, cancel()], loop=loop)) |
| 410 | assert log.debug.called |
| 411 | |
| 412 | |
| 413 | def test_handle_cancelled(make_srv, loop): |
nothing calls this directly
no test coverage detected