(self)
| 364 | assert fun(*args) == r1 |
| 365 | |
| 366 | def test_get_timeout(self): |
| 367 | res = self.app.AsyncResult(self.task4['id']) # has RETRY state |
| 368 | with pytest.raises(TimeoutError): |
| 369 | res.get(timeout=0.001) |
| 370 | |
| 371 | pending_res = self.app.AsyncResult(uuid()) |
| 372 | with patch('celery.result.time') as _time: |
| 373 | with pytest.raises(TimeoutError): |
| 374 | pending_res.get(timeout=0.001, interval=0.001) |
| 375 | _time.sleep.assert_called_with(0.001) |
| 376 | |
| 377 | def test_get_timeout_longer(self): |
| 378 | res = self.app.AsyncResult(self.task4['id']) # has RETRY state |
nothing calls this directly
no test coverage detected