Browse Source

Fixed a test suddenly stopped passing after amqplib 0.6.1 (don't even know why
it passed before)

Ask Solem 15 years ago
parent
commit
89afec0303
1 changed files with 3 additions and 2 deletions
  1. 3 2
      celery/tests/test_task.py

+ 3 - 2
celery/tests/test_task.py

@@ -273,11 +273,12 @@ class TestTaskSet(unittest.TestCase):
         self.assertEquals(ts.task_name, IncrementCounterTask.name)
         self.assertEquals(ts.total, 9)
 
+
+        consumer = IncrementCounterTask().get_consumer()
+        consumer.discard_all()
         taskset_res = ts.run()
         subtasks = taskset_res.subtasks
         taskset_id = taskset_res.taskset_id
-
-        consumer = IncrementCounterTask().get_consumer()
         for subtask in subtasks:
             m = consumer.decoder(consumer.fetch().body)
             self.assertEquals(m.get("taskset"), taskset_id)