MCPcopy
hub / github.com/celery/celery / setup_method

Method setup_method

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

Source from the content-addressed store, hash-verified

906class test_failed_AsyncResult:
907
908 def setup_method(self):
909 self.size = 11
910 self.app.conf.result_serializer = 'pickle'
911 results = make_mock_group(self.app, 10)
912 failed = mock_task('ts11', states.FAILURE, KeyError('Baz'))
913 save_result(self.app, failed)
914 failed_res = self.app.AsyncResult(failed['id'])
915 self.ts = self.app.GroupResult(uuid(), results + [failed_res])
916
917 def test_completed_count(self):
918 assert self.ts.completed_count() == len(self.ts) - 1

Callers

nothing calls this directly

Calls 5

make_mock_groupFunction · 0.85
mock_taskFunction · 0.85
save_resultFunction · 0.85
GroupResultMethod · 0.80
AsyncResultMethod · 0.45

Tested by

no test coverage detected