MCPcopy
hub / github.com/aio-libs/aiohttp / test_not_allowed_repr

Method test_not_allowed_repr

tests/test_urldispatch.py:463–478  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

461 self.loop.run_until_complete(go())
462
463 def test_not_allowed_repr(self):
464
465 @asyncio.coroutine
466 def go():
467 handler = self.make_handler()
468 self.router.add_route('GET', '/path/to', handler)
469
470 handler2 = self.make_handler()
471 self.router.add_route('POST', '/path/to', handler2)
472
473 req = self.make_request('PUT', '/path/to')
474 match_info = yield from self.router.resolve(req)
475 self.assertEqual("<MatchInfoError 405: Method Not Allowed>",
476 repr(match_info))
477
478 self.loop.run_until_complete(go())
479
480 def test_default_expect_handler(self):
481 route = self.router.add_route('GET', '/', self.make_handler())

Callers

nothing calls this directly

Calls 1

goFunction · 0.70

Tested by

no test coverage detected