Explorar o código

Set task test chord to a more realistic value

Dan McGee %!s(int64=13) %!d(string=hai) anos
pai
achega
6a9f744a7b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      celery/tests/test_task/__init__.py

+ 1 - 1
celery/tests/test_task/__init__.py

@@ -344,7 +344,7 @@ class TestCeleryTasks(unittest.TestCase):
     def test_after_return(self):
         task = self.createTaskCls("T1", "c.unittest.t.after_return")()
         task.backend = Mock()
-        task.request.chord = {}
+        task.request.chord = return_True_task.subtask()
         task.after_return("SUCCESS", 1.0, "foobar", (), {}, None)
         task.backend.on_chord_part_return.assert_called_with(task)
         task.request.clear()