(self)
| 1277 | self.mytask.pop_request() |
| 1278 | |
| 1279 | def test_annotate(self): |
| 1280 | with patch('celery.app.task.resolve_all_annotations') as anno: |
| 1281 | anno.return_value = [{'FOO': 'BAR'}] |
| 1282 | |
| 1283 | @self.app.task(shared=False) |
| 1284 | def task(): |
| 1285 | pass |
| 1286 | |
| 1287 | task.annotate() |
| 1288 | assert task.FOO == 'BAR' |
| 1289 | |
| 1290 | def test_after_return(self): |
| 1291 | self.mytask.push_request() |