def testViewTree(self): root = View({'root':1}, None) children = ["A", "B", "C"] for s in children: root.add(View({s:1}, None)) self.assertEquals(len(children), len(root.children))
def testViewTreeParent(self): root = View({'root':1}, None) children = ["A", "B", "C"] for s in children: root.add(View({s:1}, None)) for ch in root.children: self.assertTrue(ch.parent == root)