Exemplo n.º 1
0
    def test_health(self):
        with mock.patch.object(self.transport, 'send',
                               autospec=True) as send_method:
            resp = response.Response(None, None)
            send_method.return_value = resp

            req = request.Request()
            core.health(self.transport, req)
 def health(self):
     """Gets the health status of Zaqar server."""
     req, trans = self._request_and_transport()
     try:
         core.health(trans, req)
         return True
     except errors.ServiceUnavailableError:
         return False
Exemplo n.º 3
0
 def health(self):
     """Gets the health status of Zaqar server."""
     req, trans = self._request_and_transport()
     try:
         core.health(trans, req)
         return True
     except errors.ServiceUnavailableError:
         return False
Exemplo n.º 4
0
 def health(self):
     """Gets the health status of Zaqar server."""
     req, trans = self._request_and_transport()
     return core.health(trans, req)