(self)
| 577 | self.router.add_route('INVALID_METHOD', '/path', handler) |
| 578 | |
| 579 | def test_static_handle_eof(self): |
| 580 | loop = mock.Mock() |
| 581 | route = self.router.add_static('/st', |
| 582 | os.path.dirname(aiohttp.__file__)) |
| 583 | with mock.patch('aiohttp.web_urldispatcher.os') as m_os: |
| 584 | out_fd = 30 |
| 585 | in_fd = 31 |
| 586 | fut = asyncio.Future(loop=self.loop) |
| 587 | m_os.sendfile.return_value = 0 |
| 588 | route._sendfile_cb(fut, out_fd, in_fd, 0, 100, loop, False) |
| 589 | m_os.sendfile.assert_called_with(out_fd, in_fd, 0, 100) |
| 590 | self.assertTrue(fut.done()) |
| 591 | self.assertIsNone(fut.result()) |
| 592 | self.assertFalse(loop.add_writer.called) |
| 593 | self.assertFalse(loop.remove_writer.called) |
| 594 | |
| 595 | def test_static_handle_again(self): |
| 596 | loop = mock.Mock() |
nothing calls this directly
no test coverage detected