MCPcopy Create free account
hub / github.com/EasyIME/PIME / get_app

Method get_app

python/python3/tornado/test/routing_test.py:135–153  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

133
134class CustomRouterTestCase(AsyncHTTPTestCase):
135 def get_app(self):
136 router = CustomRouter()
137
138 class CustomApplication(Application):
139 def reverse_url(self, name, *args):
140 return router.reverse_url(name, *args)
141
142 app1 = CustomApplication(app_name="app1")
143 app2 = CustomApplication(app_name="app2")
144
145 router.add_routes(
146 {
147 "/first_handler": (app1, FirstHandler),
148 "/second_handler": (app2, SecondHandler),
149 "/first_handler_second_app": (app2, FirstHandler),
150 }
151 )
152
153 return router
154
155 def test_custom_router(self):
156 response = self.fetch("/first_handler")

Callers

nothing calls this directly

Calls 3

add_routesMethod · 0.95
CustomRouterClass · 0.85
CustomApplicationClass · 0.85

Tested by

no test coverage detected