MCPcopy
hub / github.com/celery/celery / test_context_get

Method test_context_get

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

Source from the content-addressed store, hash-verified

1266 assert 'v2 compatible' in repr(self.mytask)
1267
1268 def test_context_get(self):
1269 self.mytask.push_request()
1270 try:
1271 request = self.mytask.request
1272 request.foo = 32
1273 assert request.get('foo') == 32
1274 assert request.get('bar', 36) == 36
1275 request.clear()
1276 finally:
1277 self.mytask.pop_request()
1278
1279 def test_annotate(self):
1280 with patch('celery.app.task.resolve_all_annotations') as anno:

Callers

nothing calls this directly

Calls 4

push_requestMethod · 0.80
pop_requestMethod · 0.80
getMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected