MCPcopy
hub / github.com/celery/celery / test_save_restore

Method test_save_restore

t/unit/tasks/test_result.py:755–766  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

753 assert ts[0] is subs[0]
754
755 def test_save_restore(self):
756 subs = [MockAsyncResultSuccess(uuid(), app=self.app),
757 MockAsyncResultSuccess(uuid(), app=self.app)]
758 ts = self.app.GroupResult(uuid(), subs)
759 ts.save()
760 with pytest.raises(AttributeError):
761 ts.save(backend=object())
762 assert self.app.GroupResult.restore(ts.id).results == ts.results
763 ts.delete()
764 assert self.app.GroupResult.restore(ts.id) is None
765 with pytest.raises(AttributeError):
766 self.app.GroupResult.restore(ts.id, backend=object())
767
768 def test_save_restore_empty(self):
769 subs = []

Callers

nothing calls this directly

Calls 6

saveMethod · 0.95
deleteMethod · 0.95
GroupResultMethod · 0.80
raisesMethod · 0.45
restoreMethod · 0.45

Tested by

no test coverage detected