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

Method test_mark_as_retry

t/unit/backends/test_couchdb.py:191–201  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

189 assert self.backend.get_state(tid) == states.REVOKED
190
191 def test_mark_as_retry(self):
192 tid = uuid()
193 try:
194 raise KeyError('foo')
195 except KeyError as exception:
196 import traceback
197 trace = '\n'.join(traceback.format_stack())
198 self.backend.mark_as_retry(tid, exception, traceback=trace)
199 assert self.backend.get_state(tid) == states.RETRY
200 assert isinstance(self.backend.get_result(tid), KeyError)
201 assert self.backend.get_traceback(tid) == trace
202
203 def test_mark_as_failure(self):
204 tid = uuid()

Callers

nothing calls this directly

Calls 5

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