Beispiel #1
0
 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')))
Beispiel #2
0
 def test_send_message(self):
     client = ZMQClient('tcp://localhost:5555')
     client.send_message(str(Request('go')))