(self)
| 133 | |
| 134 | class 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") |
nothing calls this directly
no test coverage detected