def test_register_router(self): route_handler.register(Router) self.assertIsNotNone(route_handler.get_route_handler( Router.get_name()))
def test_register_router(self): route_handler.register(Router) self.assertIsNotNone(route_handler.get_route_handler(Router.get_name()))
def client_send(self, data): if not isinstance(data, dict): data = json.loads(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data)