MCPcopy Create free account
hub / github.com/celery/celery / task_context

Method task_context

t/unit/worker/test_loops.py:190–194  ·  view source on GitHub ↗
(self, sig, **kwargs)

Source from the content-addressed store, hash-verified

188 assert x.hub.timer.call_repeatedly.call_count == 1
189
190 def task_context(self, sig, **kwargs):
191 x, on_task = get_task_callback(self.app, **kwargs)
192 message = self.task_message_from_sig(self.app, sig)
193 strategy = x.obj.strategies[sig.task] = Mock(name='strategy')
194 return x, on_task, message, strategy
195
196 def test_on_task_received(self):
197 x, on_task, msg, strategy = self.task_context(self.add.s(2, 2))

Calls 1

get_task_callbackFunction · 0.85

Tested by

no test coverage detected