diff options
-rw-r--r-- | python/tests_0-8/basic.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/tests_0-8/basic.py b/python/tests_0-8/basic.py index 140576540a..95ca0d7287 100644 --- a/python/tests_0-8/basic.py +++ b/python/tests_0-8/basic.py @@ -126,12 +126,13 @@ class BasicTests(TestBase): channel.basic_consume(consumer_tag="my-consumer", queue="test-queue-4") channel.basic_publish(routing_key="test-queue-4", content=Content("One")) - #cancel should stop messages being delivered - channel.basic_cancel(consumer_tag="my-consumer") - channel.basic_publish(routing_key="test-queue-4", content=Content("Two")) myqueue = self.client.queue("my-consumer") msg = myqueue.get(timeout=1) self.assertEqual("One", msg.content.body) + + #cancel should stop messages being delivered + channel.basic_cancel(consumer_tag="my-consumer") + channel.basic_publish(routing_key="test-queue-4", content=Content("Two")) try: msg = myqueue.get(timeout=1) self.fail("Got message after cancellation: " + msg) |