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

Method test_on_task_DecodeError

t/unit/worker/test_loops.py:236–240  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

234 x.on_invalid_task.assert_called_with(None, msg, exc)
235
236 def test_on_task_DecodeError(self):
237 x, on_task, msg, strategy = self.task_context(self.add.s(2, 2))
238 exc = strategy.side_effect = DecodeError()
239 on_task(msg)
240 x.on_decode_error.assert_called_with(msg, exc)
241
242 @pytest.mark.parametrize('should_stop', (None, False, True, EX_OK))
243 def test_should_terminate(self, should_stop):

Callers

nothing calls this directly

Calls 3

task_contextMethod · 0.95
on_taskFunction · 0.85
sMethod · 0.45

Tested by

no test coverage detected