(self)
| 593 | self.assertFalse(loop.remove_writer.called) |
| 594 | |
| 595 | def test_static_handle_again(self): |
| 596 | loop = mock.Mock() |
| 597 | route = self.router.add_static('/st', |
| 598 | os.path.dirname(aiohttp.__file__)) |
| 599 | with mock.patch('aiohttp.web_urldispatcher.os') as m_os: |
| 600 | out_fd = 30 |
| 601 | in_fd = 31 |
| 602 | fut = asyncio.Future(loop=self.loop) |
| 603 | m_os.sendfile.side_effect = BlockingIOError() |
| 604 | route._sendfile_cb(fut, out_fd, in_fd, 0, 100, loop, False) |
| 605 | m_os.sendfile.assert_called_with(out_fd, in_fd, 0, 100) |
| 606 | self.assertFalse(fut.done()) |
| 607 | loop.add_writer.assert_called_with(out_fd, route._sendfile_cb, |
| 608 | fut, out_fd, in_fd, 0, 100, |
| 609 | loop, True) |
| 610 | self.assertFalse(loop.remove_writer.called) |
| 611 | |
| 612 | def test_static_handle_exception(self): |
| 613 | loop = mock.Mock() |
nothing calls this directly
no test coverage detected