MCPcopy
hub / github.com/celery/celery / test_from_dict_deeper_deserialize

Method test_from_dict_deeper_deserialize

t/unit/tasks/test_canvas.py:998–1012  ·  view source on GitHub ↗
(self, group_type)

Source from the content-addressed store, hash-verified

996
997 @pytest.mark.parametrize("group_type", (group, group_subclass))
998 def test_from_dict_deeper_deserialize(self, group_type):
999 inner_group = group_type([self.add.s(1, 2)] * 42)
1000 outer_group = group_type([inner_group] * 42)
1001 serialized_group = json.loads(json.dumps(outer_group))
1002 deserialized_group = group_type.from_dict(serialized_group)
1003 assert isinstance(deserialized_group, group_type)
1004 assert all(
1005 isinstance(child_task, group_type)
1006 for child_task in deserialized_group.tasks
1007 )
1008 assert all(
1009 isinstance(grandchild_task, Signature)
1010 for child_task in deserialized_group.tasks
1011 for grandchild_task in child_task.tasks
1012 )
1013
1014 def test_call_empty_group(self):
1015 x = group(app=self.app)

Callers

nothing calls this directly

Calls 2

sMethod · 0.45
from_dictMethod · 0.45

Tested by

no test coverage detected