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

Method test_process_cleanup_fails

t/unit/worker/test_request.py:116–124  ·  view source on GitHub ↗
(self, patching)

Source from the content-addressed store, hash-verified

114class test_trace_task(RequestCase):
115
116 def test_process_cleanup_fails(self, patching):
117 _logger = patching('celery.app.trace.logger')
118 self.mytask.backend = Mock()
119 self.mytask.backend.process_cleanup = Mock(side_effect=KeyError())
120 tid = uuid()
121 ret = jail(self.app, tid, self.mytask.name, {}, [2], {})
122 assert ret == 4
123 self.mytask.backend.mark_as_done.assert_called()
124 assert 'Process cleanup failed' in _logger.error.call_args[0][0]
125
126 def test_process_cleanup_BaseException(self):
127 self.mytask.backend = Mock()

Callers

nothing calls this directly

Calls 2

patchingFunction · 0.85
jailFunction · 0.85

Tested by

no test coverage detected