MCPcopy
hub / github.com/celery/celery / MockAsyncResultSuccess

Class MockAsyncResultSuccess

t/unit/tasks/test_result.py:616–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614
615
616class MockAsyncResultSuccess(AsyncResult):
617 forgotten = False
618
619 def __init__(self, *args, **kwargs):
620 self._result = kwargs.pop('result', 42)
621 super().__init__(*args, **kwargs)
622
623 def forget(self):
624 self.forgotten = True
625
626 @property
627 def result(self):
628 return self._result
629
630 @property
631 def state(self):
632 return states.SUCCESS
633
634 def get(self, **kwargs):
635 return self.result
636
637
638class SimpleBackend(SyncBackendMixin):

Callers 7

test_forgetMethod · 0.85
test_getitemMethod · 0.85
test_save_restoreMethod · 0.85
test_restore_appMethod · 0.85
test_join_timeoutMethod · 0.85

Calls

no outgoing calls

Tested by 7

test_forgetMethod · 0.68
test_getitemMethod · 0.68
test_save_restoreMethod · 0.68
test_restore_appMethod · 0.68
test_join_timeoutMethod · 0.68