(self)
| 791 | GroupResult.restore(ts.id) |
| 792 | |
| 793 | def test_join_native(self): |
| 794 | backend = SimpleBackend() |
| 795 | results = [self.app.AsyncResult(uuid(), backend=backend) |
| 796 | for i in range(10)] |
| 797 | ts = self.app.GroupResult(uuid(), results) |
| 798 | |
| 799 | with patch('celery.Celery.backend', new=backend): |
| 800 | backend.ids = [result.id for result in results] |
| 801 | res = ts.join_native() |
| 802 | assert res == list(range(10)) |
| 803 | callback = Mock(name='callback') |
| 804 | assert not ts.join_native(callback=callback) |
| 805 | callback.assert_has_calls([ |
| 806 | call(r.id, i) for i, r in enumerate(ts.results) |
| 807 | ]) |
| 808 | |
| 809 | def test_join_native_raises(self): |
| 810 | ts = self.app.GroupResult(uuid(), [self.app.AsyncResult(uuid())]) |
nothing calls this directly
no test coverage detected