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

Method test_mark_as_failure

t/unit/backends/test_cache.py:65–71  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

63 assert rindb.get('bar').data == 12345
64
65 def test_mark_as_failure(self):
66 try:
67 raise KeyError('foo')
68 except KeyError as exception:
69 self.tb.mark_as_failure(self.tid, exception)
70 assert self.tb.get_state(self.tid) == states.FAILURE
71 assert isinstance(self.tb.get_result(self.tid), KeyError)
72
73 def test_apply_chord(self):
74 tb = CacheBackend(backend='memory://', app=self.app)

Callers

nothing calls this directly

Calls 3

mark_as_failureMethod · 0.80
get_stateMethod · 0.80
get_resultMethod · 0.80

Tested by

no test coverage detected