MCPcopy Create free account
hub / github.com/celery/celery / test_modified_context

Method test_modified_context

t/unit/tasks/test_context.py:38–46  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36 assert get_context_as_dict(Context()) == default_context
37
38 def test_modified_context(self):
39 expected = dict(default_context)
40 ctx = Context()
41 expected['id'] = 'unique id'
42 expected['args'] = ['some', 1]
43 ctx.id = 'unique id'
44 ctx.args = ['some', 1]
45 assert get_context_as_dict(ctx) == expected
46 assert get_context_as_dict(Context()) == default_context
47
48 def test_cleared_context(self):
49 changes = {'id': 'unique id', 'args': ['some', 1], 'wibble': 'wobble'}

Callers

nothing calls this directly

Calls 2

ContextClass · 0.90
get_context_as_dictFunction · 0.85

Tested by

no test coverage detected