| 1618 | assert isinstance(rebuilt_chord, chord_type) |
| 1619 | |
| 1620 | def test_from_dict_deep_deserialize(self, subtests): |
| 1621 | header = body = self.add.s(1, 2) |
| 1622 | original_chord = chord(header=header, body=body) |
| 1623 | serialized_chord = json.loads(json.dumps(original_chord)) |
| 1624 | deserialized_chord = chord.from_dict(serialized_chord) |
| 1625 | with subtests.test(msg="Verify chord is deserialized"): |
| 1626 | assert isinstance(deserialized_chord, chord) |
| 1627 | with subtests.test(msg="Validate chord header tasks is deserialized"): |
| 1628 | assert all( |
| 1629 | isinstance(child_task, Signature) |
| 1630 | for child_task in deserialized_chord.tasks |
| 1631 | ) |
| 1632 | with subtests.test(msg="Verify chord body is deserialized"): |
| 1633 | assert isinstance(deserialized_chord.body, Signature) |
| 1634 | |
| 1635 | @pytest.mark.parametrize("group_type", [group, group_subclass]) |
| 1636 | def test_from_dict_deep_deserialize_group(self, subtests, group_type): |