def test_receive_callback__message_errors(self):
        channel = self.connection.channel()
        channel.message_to_python = None
        c = channel.Consumer()
        message = Mock()
        try:
            raise KeyError('foo')
        except __HOLE__:
            message.errors = [sys.exc_info()]
        message._reraise_error.side_effect = KeyError()
        with self.assertRaises(KeyError):
            c._receive_callback(message)
dataset/ETHPy150Open celery/kombu/kombu/tests/test_messaging.py/test_Consumer.test_receive_callback__message_errors