def test_connection_basic_read_buffer(self): connection = Connection('127.0.0.1', 'guest', 'guest', lazy=True) cancel_ok_frame = spec_basic.CancelOk().marshal() self.assertEqual(connection._read_buffer(cancel_ok_frame), b'\x00')
def test_connection_basic_handle_amqp_frame(self): connection = Connection('127.0.0.1', 'guest', 'guest', lazy=True) cancel_ok_frame = spec_basic.CancelOk().marshal() self.assertEqual(connection._handle_amqp_frame(cancel_ok_frame), (b'\x00', None, None))