def test_send_message_conn_error(self):
     client = ZMQClient('tcp://localhost:5555')
     # Set timeouts
     client.socket.setsockopt(zmq.RCVTIMEO, 5)
     client.socket.setsockopt(zmq.SNDTIMEO, 5)
     client.socket.setsockopt(zmq.LINGER, 5)
     with self.assertRaises(zmq.error.ZMQError):
         client._send_message(str(Request('go')))
Exemple #2
0
 def test_send_message_conn_error(self):
     client = ZMQClient("tcp://localhost:5555")
     # Set timeouts
     # pylint:disable=no-member
     client.socket.setsockopt(zmq.RCVTIMEO, 5)
     client.socket.setsockopt(zmq.SNDTIMEO, 5)
     client.socket.setsockopt(zmq.LINGER, 5)
     # pylint:enable=no-member
     with self.assertRaises(zmq.error.ZMQError):
         client._send_message(str(Request("go")))
 def test_send_message(self):
     client = ZMQClient('tcp://localhost:5555')
     client._send_message(str(Request('go')))
 def test_instantiate():
     ZMQClient('tcp://localhost:5555')
Exemple #5
0
 def test_send_message(self):  # pylint: disable=no-self-use
     client = ZMQClient("tcp://localhost:5555")
     client._send_message(str(Request("go")))