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

Method test_add_route_simple

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

Source from the content-addressed store, hash-verified

104 self.assertIsNone(info.route.name)
105
106 def test_add_route_simple(self):
107 handler = self.make_handler()
108 self.router.add_route('GET', '/handler/to/path', handler)
109 req = self.make_request('GET', '/handler/to/path')
110 info = self.loop.run_until_complete(self.router.resolve(req))
111 self.assertIsNotNone(info)
112 self.assertEqual(0, len(info))
113 self.assertIs(handler, info.handler)
114 self.assertIsNone(info.route.name)
115
116 def test_add_with_matchdict(self):
117 handler = self.make_handler()

Callers

nothing calls this directly

Calls 4

make_handlerMethod · 0.95
make_requestMethod · 0.95
add_routeMethod · 0.45
resolveMethod · 0.45

Tested by

no test coverage detected