MCPcopy
hub / github.com/celery/celery / test_cleared_context

Method test_cleared_context

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

Source from the content-addressed store, hash-verified

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'}
50 ctx = Context()
51 ctx.update(changes)
52 ctx.clear()
53 defaults = dict(default_context, children=[])
54 assert get_context_as_dict(ctx) == defaults
55 assert get_context_as_dict(Context()) == defaults
56
57 def test_context_get(self):
58 expected = dict(default_context)

Callers

nothing calls this directly

Calls 4

updateMethod · 0.95
clearMethod · 0.95
ContextClass · 0.90
get_context_as_dictFunction · 0.85

Tested by

no test coverage detected