Example #1
0
    def test_Get(self, request_mock):
        endpoint = ["BL18I:XSPRESS3", "state", "value"]
        get = Request.Get(self.context, self.response_queue, endpoint)

        request_mock.assert_called_once_with(self.context,
                                             self.response_queue,
                                             type_="Get")
Example #2
0
 def create_methods(self):
     """Get methods from remote block and mirror them internally"""
     request = Request.Get(None, self.q, [self.block.name])
     self.client_comms.q.put(request)
     self.log_debug("Waiting for response to Get %s", self.block.name)
     response = self.q.get()
     # Find all the methods
     for aname, amap in response.value.items():
         # TODO: If it has "takes" it's a method, flaky...
         if "takes" in amap:
             yield self.wrap_method(aname, amap)