MCPcopy
hub / github.com/celery/celery / test_annotate

Method test_annotate

t/unit/tasks/test_tasks.py:1279–1288  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 1

annotateMethod · 0.45

Tested by

no test coverage detected