

def test_functional_basic_nack(self):
    payload = 'hello world'
    queue = 'test_functional_basic_nack'
    try:
        self.channel.queue.declare(queue)
        self.channel.basic.publish(payload, queue)
        message = self.channel.basic.get(queue, to_dict=True)
        result = self.channel.basic.nack(requeue=False, delivery_tag=message['method']['delivery_tag'])
        self.assertEqual(result, None)
        self.assertFalse(self.channel.basic.get(queue, to_dict=True))
    finally:
        self.channel.queue.delete(queue)

dataset/ETHPy150Open eandersson/amqpstorm/amqpstorm/tests/functional/basic_tests.py BasicFunctionalTests.test_functional_basic_nack/original