Test that chord clone ensures the kwargs are the same
(self, subtests)
| 1719 | assert isinstance(deserialized_chord.body, _chain) |
| 1720 | |
| 1721 | def test_chord_clone_kwargs(self, subtests): |
| 1722 | """ Test that chord clone ensures the kwargs are the same """ |
| 1723 | |
| 1724 | with subtests.test(msg='Verify chord cloning clones kwargs correctly'): |
| 1725 | c = chord([signature('g'), signature('h')], signature('i'), kwargs={'U': 6}) |
| 1726 | c2 = c.clone() |
| 1727 | assert c2.kwargs == c.kwargs |
| 1728 | |
| 1729 | with subtests.test(msg='Cloning the chord with overridden kwargs'): |
| 1730 | override_kw = {'X': 2} |
| 1731 | c3 = c.clone(args=(1,), kwargs=override_kw) |
| 1732 | |
| 1733 | with subtests.test(msg='Verify the overridden kwargs were cloned correctly'): |
| 1734 | new_kw = c.kwargs.copy() |
| 1735 | new_kw.update(override_kw) |
| 1736 | assert c3.kwargs == new_kw |
| 1737 | |
| 1738 | def test_flag_allow_error_cb_on_chord_header(self, subtests): |
| 1739 | header_mock = [Mock(name='t1'), Mock(name='t2')] |