def testParent(self):

        uids = self.uids
        rows = self.rows
        links = self.links

        assertEqual = self.assertEqual

        h = S3Hierarchy("test_lhierarchy")
        for uid in uids:
            parent, category = h.parent(uids[uid], classify=True)
            assertEqual(parent, links[uid].parent_id)
            if parent:
                parent_uid = self.ids[parent]
                assertEqual(category, rows[parent_uid].category)

    # -------------------------------------------------------------------------
Test parent lookup
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3hierarchy.py/S3LinkedHierarchyTests.testParent