'Test node path lookup'

def testPath(self):

    uids = self.uids
    rows = self.rows
    assertEqual = self.assertEqual
    node = uids['HIERARCHY2-1-2']
    h = S3Hierarchy('test_hierarchy')
    path = h.path(node)
    assertEqual(path, [uids['HIERARCHY2'], uids['HIERARCHY2-1'], uids['HIERARCHY2-1-2']])
    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')])
    node = uids['HIERARCHY2']
    path = h.path(node, category='Cat    1', classify=True)
    classified = (lambda uid: (uids[uid], rows[uid].category))
    assertEqual(path, [classified('HIERARCHY2')])
