def test_addIntrospection(self):
        """A 'system' handler is installed."""
        handler = FakeHandler()

        jsonrpc.addIntrospection(handler)

        self.assertIn('system', handler.subHandlers)
Example #2
0
 def setUp(self):
     jsonrpc = Test()
     addIntrospection(jsonrpc)
     self.p = reactor.listenTCP(0,
                                server.Site(jsonrpc),
                                interface="127.0.0.1")
     self.port = self.p.getHost().port
Example #3
0
    def test_addIntrospection(self):
        """A 'system' handler is installed."""
        handler = FakeHandler()

        jsonrpc.addIntrospection(handler)

        self.assertIn('system', handler.subHandlers)
Example #4
0
 def setup_worker(self):
     config = self.get_static_config()
     redis_manager = yield TxRedisManager.from_config(config.redis_manager)
     lop_manager = LopManager(redis_manager)
     rpc = LopApiServer(lop_manager)
     addIntrospection(rpc)
     site = Site(rpc)
     self.addService(strports.service(config.twisted_endpoint, site))
Example #5
0
 def setup_worker(self):
     config = self.get_static_config()
     self.redis_manager = yield TxRedisManager.from_config(
         config.redis_manager)
     tagpool = TagpoolManager(self.redis_manager)
     rpc = TagpoolApiServer(tagpool)
     addIntrospection(rpc)
     site = build_web_site({
         config.web_path: rpc,
         config.health_path: httprpc.HttpRpcHealthResource(self),
     })
     self.addService(
         StreamServerEndpointService(config.twisted_endpoint, site))
Example #6
0
 def setup_worker(self):
     config = self.get_static_config()
     self.redis_manager = yield TxRedisManager.from_config(
         config.redis_manager)
     tagpool = TagpoolManager(self.redis_manager)
     rpc = TagpoolApiServer(tagpool)
     addIntrospection(rpc)
     site = build_web_site({
         config.web_path:
         rpc,
         config.health_path:
         httprpc.HttpRpcHealthResource(self),
     })
     self.addService(
         StreamServerEndpointService(config.twisted_endpoint, site))
Example #7
0
 def setUp(self):
     jsonrpc = Test()
     addIntrospection(jsonrpc)
     self.p = reactor.listenTCP(
         0, server.Site(jsonrpc), interface="127.0.0.1")
     self.port = self.p.getHost().port
Example #8
0
 def _rpc_resource_for_user(self, username):
     rpc = GoApiServer(username, self.vumi_api)
     addIntrospection(rpc)
     return rpc