def testIterNode(self): result = [] expected = ["FOO", "BAR"] for nameElem in HelperXml.iterNodeElement( self.dom, "root", "blap", "subnode", "name" ): result.append(HelperXml.getNodeText(nameElem)) self.assertEqual( result, expected )
def testIterNodeAttrManual(self): result = [] expected = ["1", "2", "3"] for nodeElem in HelperXml.iterNodeElement( self.dom, "root", "node" ): result.append(HelperXml.getNodeAttribute(nodeElem, "attr")) self.assertEqual( result, expected )