def check_published_page_attributes(self, page):
        public_page = page.publisher_public

        if page.parent:
            self.assertEqual(page.parent_id, public_page.parent.publisher_draft.id)

        self.assertEqual(page.depth, public_page.depth)

        draft_siblings = list(Page.objects.filter(parent_id=page.parent_id, publisher_is_draft=True).order_by('path'))
        public_siblings = list(Page.objects.filter(parent_id=public_page.parent_id, publisher_is_draft=False).order_by('path'))
        skip = 0
        for i, sibling in enumerate(draft_siblings):
            if not sibling.publisher_public_id:
                skip += 1
                continue
            self.assertEqual(sibling.id,
                             public_siblings[skip - i].publisher_draft.id)
dataset/ETHPy150Open divio/django-cms/cms/test_utils/testcases.py/BaseCMSTestCase.check_published_page_attributes/swapped operands of `-`