Tests basic task call
(self, manager)
| 79 | |
| 80 | @flaky |
| 81 | def test_basic_task(self, manager): |
| 82 | """Tests basic task call""" |
| 83 | results = [] |
| 84 | # Tests calling task only with args |
| 85 | for i in range(10): |
| 86 | results.append([i + i, add.delay(i, i)]) |
| 87 | for expected, result in results: |
| 88 | value = result.get(timeout=10) |
| 89 | assert value == expected |
| 90 | assert result.status == 'SUCCESS' |
| 91 | assert result.ready() is True |
| 92 | assert result.successful() is True |
| 93 | |
| 94 | results = [] |
| 95 | # Tests calling task with args and kwargs |
| 96 | for i in range(10): |
| 97 | results.append([3*i, add.delay(i, i, z=i)]) |
| 98 | for expected, result in results: |
| 99 | value = result.get(timeout=10) |
| 100 | assert value == expected |
| 101 | assert result.status == 'SUCCESS' |
| 102 | assert result.ready() is True |
| 103 | assert result.successful() is True |
| 104 | |
| 105 | def test_task_sent_event_respects_publish_retry_limit(self, manager, monkeypatch): |
| 106 | app = manager.app |
nothing calls this directly
no test coverage detected