def testPath(self):

        uids = self.uids
        rows = self.rows

        assertEqual = self.assertEqual

        # Standard path from root
        node = uids["HIERARCHY2-1-2"]
        h = S3Hierarchy("test_hierarchy")
        path = h.path(node)
        assertEqual(path, [uids["HIERARCHY2"],
                           uids["HIERARCHY2-1"],
                           uids["HIERARCHY2-1-2"]
                           ])

        # Path from category root
        node = uids["HIERARCHY1-1-1"]
        path = h.path(node, category="Cat 1", classify=True)
        classified = lambda uid: (uids[uid], rows[uid].category)
        assertEqual(path, [classified("HIERARCHY1-1"),
                           classified("HIERARCHY1-1-1"),
                           ])

        # Path of root
        node = uids["HIERARCHY2"]
        path = h.path(node, category="Cat 1", classify=True)
        classified = lambda uid: (uids[uid], rows[uid].category)
        assertEqual(path, [classified("HIERARCHY2")])

    # -------------------------------------------------------------------------
Tests that creating a node that already exists results in an error.
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3hierarchy.py/S3HierarchyTests.testPath--crossover with--dataset/ETHPy150Open malcolmt/django-acacia/acacia/tests/test_models.py/TopicTest.test_create_duplicate_entry