'Test lookup of descendant nodes'

def testFindAll(self):

    uids = self.uids
    assertEqual = self.assertEqual
    h = S3Hierarchy('test_lhierarchy')
    root = uids['LHIERARCHY1']
    nodes = h.findall(root)
    expected = ['LHIERARCHY1-1', 'LHIERARCHY1-1-1', 'LHIERARCHY1-1-2', 'LHIERARCHY1-2', 'LHIERARCHY1-2-1', 'LHIERARCHY1-2-2']
    assertEqual(nodes, set((uids[uid] for uid in expected)))
    root = uids['LHIERARCHY1']
    nodes = h.findall(root, inclusive=True)
    expected = ['LHIERARCHY1', 'LHIERARCHY1-1', 'LHIERARCHY1-1-1', 'LHIERARCHY1-1-2', 'LHIERARCHY1-2', 'LHIERARCHY1-2-1', 'LHIERARCHY1-2-2']
    assertEqual(nodes, set((uids[uid] for uid in expected)))
    root = uids['LHIERARCHY2']
    nodes = h.findall(root, category='Cat    1')
    expected = ['LHIERARCHY2-1']
    assertEqual(nodes, set((uids[uid] for uid in expected)))
    root = uids['LHIERARCHY1']
    nodes = h.findall(root, category='Cat    4')
    assertEqual(nodes, set())
