예제 #1
0
파일: api.py 프로젝트: todun/junebug
 def create_router(self, request, body):
     """Create a new router"""
     router = Router(self, body)
     yield router.validate_config()
     router.start(self.service)
     yield router.save()
     returnValue(response(
         request,
         'router created',
         (yield router.status()),
         code=http.CREATED
     ))
예제 #2
0
 def test_status(self):
     """status should return the current config of the router"""
     config = self.create_router_config()
     router = Router(self.api, config)
     status = yield router.status()
     self.assertEqual(status, router.router_config)
예제 #3
0
 def test_status(self):
     """status should return the current config of the router"""
     config = self.create_router_config()
     router = Router(self.api, config)
     status = yield router.status()
     self.assertEqual(status, router.router_config)