Example #1
0
 def test_receive_key_zbxd(self):
     sent_key = KEY
     self.client.recv.side_effect = [
         self.protocol.HEADER,
         struct.pack('q', len(sent_key)),
         b(sent_key)
     ]
     received_key = self.protocol.receive_value(self.client)
     assert_is_instance(received_key, string_types)
     assert_equal(u(sent_key), received_key)
Example #2
0
 def test_raises_exception_for_non_binary_requests(self):
     assert_raises(WrongArgumentError,
                   tcp_communication,
                   PORT,
                   requests=[u('request')])
Example #3
0
 def test_raises_exception_for_non_binary_requests(self):
     assert_raises(WrongArgumentError, tcp_communication, PORT,
                   requests=[u('request')])