def test_failed_join_report(self):
    res = Mock()
    ts = self.app.GroupResult(uuid(), [res])
    res.state = states.FAILURE
    res.backend.is_cached.return_value = True
    self.assertIs(next(ts._failed_join_report()), res)
    res.backend.is_cached.return_value = False
    with self.assertRaises(StopIteration):
        next(ts._failed_join_report())
def test_failed_join_report(self):
    res = Mock()
    ts = self.app.GroupResult(uuid(), [res])
    res.state = states.FAILURE
    res.backend.is_cached.return_value = True
    self.assertIs(next(ts._failed_join_report()), res)
    res.backend.is_cached.return_value = False
    with self.assertRaises(StopIteration):
        next(ts._failed_join_report())