MCPcopy
hub / github.com/celery/celery / test_mark_as_retry

Method test_mark_as_retry

t/unit/backends/test_database.py:328–339  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

326 assert tb.get_state(tid) == states.REVOKED
327
328 def test_mark_as_retry(self):
329 tb = DatabaseBackend(self.uri, app=self.app)
330 tid = uuid()
331 try:
332 raise KeyError('foo')
333 except KeyError as exception:
334 import traceback
335 trace = '\n'.join(traceback.format_stack())
336 tb.mark_as_retry(tid, exception, traceback=trace)
337 assert tb.get_state(tid) == states.RETRY
338 assert isinstance(tb.get_result(tid), KeyError)
339 assert tb.get_traceback(tid) == trace
340
341 def test_mark_as_failure(self):
342 tb = DatabaseBackend(self.uri, app=self.app)

Callers

nothing calls this directly

Calls 6

DatabaseBackendClass · 0.90
mark_as_retryMethod · 0.80
get_stateMethod · 0.80
get_resultMethod · 0.80
get_tracebackMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected