MCPcopy
hub / github.com/celery/celery / test_mark_as_failure

Method test_mark_as_failure

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

Source from the content-addressed store, hash-verified

62 assert rindb.get('bar').data == 12345
63
64 def test_mark_as_failure(self):
65 try:
66 raise KeyError('foo')
67 except KeyError as exception:
68 self.tb.mark_as_failure(self.tid, exception)
69 assert self.tb.get_state(self.tid) == states.FAILURE
70 assert isinstance(self.tb.get_result(self.tid), KeyError)
71
72 def test_apply_chord(self):
73 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