def test_times_out(self):
    r1 = self.app.AsyncResult(uuid)
    r1.ready = Mock()
    r1.ready.return_value = False
    x = self.app.ResultSet([r1])
    with self.dummy_copy():
        with patch('celery.result.time'):
            with self.assertRaises(TimeoutError):
                list(x.iterate(timeout=1))
def test_times_out(self):
    r1 = self.app.AsyncResult(uuid)
    r1.ready = Mock()
    r1.ready.return_value = False
    x = self.app.ResultSet([r1])
    with self.dummy_copy():
        with patch('celery.result.time'):
            with self.assertRaises(TimeoutError):
                list(x.iterate(timeout=1))