Esempio n. 1
0
 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()))
Esempio n. 3
0
 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)
 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)