(self)
| 221 | self.assertEqual({'POST', 'GET'}, exc.allowed_methods) |
| 222 | |
| 223 | def test_raise_method_not_found(self): |
| 224 | handler = self.make_handler() |
| 225 | self.router.add_route('GET', '/a', handler) |
| 226 | req = self.make_request('GET', '/b') |
| 227 | |
| 228 | match_info = self.loop.run_until_complete(self.router.resolve(req)) |
| 229 | self.assertIsInstance(match_info.route, SystemRoute) |
| 230 | self.assertEqual({}, match_info) |
| 231 | |
| 232 | with self.assertRaises(HTTPNotFound) as ctx: |
| 233 | self.loop.run_until_complete(match_info.handler(req)) |
| 234 | |
| 235 | exc = ctx.exception |
| 236 | self.assertEqual(404, exc.status) |
| 237 | |
| 238 | def test_double_add_url_with_the_same_name(self): |
| 239 | handler1 = self.make_handler() |
nothing calls this directly
no test coverage detected