def test_get_timeout(self):
    res = self.app.AsyncResult(self.task4['id'])
    with self.assertRaises(TimeoutError):
        res.get(timeout=0.001)
    pending_res = self.app.AsyncResult(uuid())
    with patch('celery.result.time') as _time:
        with self.assertRaises(TimeoutError):
            pending_res.get(timeout=0.001, interval=0.001)
            _time.sleep.assert_called_with(0.001)
def test_get_timeout(self):
    res = self.app.AsyncResult(self.task4['id'])
    with self.assertRaises(TimeoutError):
        res.get(timeout=0.001)
    pending_res = self.app.AsyncResult(uuid())
    with patch('celery.result.time') as _time:
        with self.assertRaises(TimeoutError):
            pending_res.get(timeout=0.001, interval=0.001)
            _time.sleep.assert_called_with(0.001)