MCPcopy
hub / github.com/celery/celery / mock_group

Method mock_group

t/unit/app/test_builtins.py:108–114  ·  view source on GitHub ↗
(self, *tasks)

Source from the content-addressed store, hash-verified

106 self.task.apply.assert_called()
107
108 def mock_group(self, *tasks):
109 g = group(*tasks, app=self.app)
110 result = g.freeze()
111 for task in g.tasks:
112 task.clone = Mock(name='clone')
113 task.clone.attach_mock(Mock(), 'apply_async')
114 return g, result
115
116 @patch('celery.app.base.Celery.current_worker_task')
117 def test_task(self, current_worker_task):

Callers 2

test_taskMethod · 0.95

Calls 2

groupClass · 0.90
freezeMethod · 0.45

Tested by

no test coverage detected