MCPcopy
hub / github.com/celery/celery / test_on_failure_Reject_rejects

Method test_on_failure_Reject_rejects

t/unit/worker/test_request.py:312–323  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

310 req.on_ack.assert_called_with(req_logger, req.connection_errors)
311
312 def test_on_failure_Reject_rejects(self):
313 einfo = None
314 try:
315 raise Reject()
316 except Reject:
317 einfo = ExceptionInfo(internal=True)
318 assert einfo is not None
319 req = self.get_request(self.add.s(2, 2))
320 req.on_failure(einfo)
321 req.on_reject.assert_called_with(
322 req_logger, req.connection_errors, False,
323 )
324
325 def test_on_failure_Reject_rejects_with_requeue(self):
326 einfo = None

Callers

nothing calls this directly

Calls 4

get_requestMethod · 0.95
RejectClass · 0.90
sMethod · 0.45
on_failureMethod · 0.45

Tested by

no test coverage detected