def test_multiple_merge_nodes(self):
        models.Topic.objects.get_or_create_by_full_name("a/x/y/z")
        target = models.Topic.objects.get_by_full_name("a")
        node = models.Topic.objects.get_by_full_name("x")
        old_ids = (node.id, node.children.all()[0].id)
        pivot = models.Topic.objects.get_by_full_name("a/x/y")
        signals.pre_merge.connect(self.signal_catcher)
        node.merge_to(target)
        signals.pre_merge.disconnect(self.signal_catcher)
        self.assertEqual(len(self.signals), 1)
        merge_pairs = self.signals[0][1]["merge_pairs"]
        self.assertEqual(len(merge_pairs), 2)
        self.assertEqual(merge_pairs[0], (old_ids[0], pivot.parent_id))
        self.assertEqual(merge_pairs[1], (old_ids[1], pivot.id))
        try:
            models.Topic.objects.get_by_full_name("a/x/y/c")
        except models.Topic.DoesNotExist:
            self.fail("Node wasn't moved to correct location.")
A merge_to() test where more there are multiple pairs of nodes that are
dataset/ETHPy150Open malcolmt/django-acacia/acacia/tests/test_models.py/TopicTest.test_multiple_merge_nodes