def test_print_xml2(self): temp_com = Common() xml_string = "<Common><Citations><li>dvfjnkjdnv</li></Citations><ExternalLinks><li>sdcbkjsnbd</li></ExternalLinks><Images><li>efvdjkjnfv</li></Images><Videos><li>dfvnldkfjvnbo</li></Videos></Common>" root = ET.fromstring(xml_string) temp_com.populate(root) common_xml = temp_com.print_xml() self.assertEqual(xml_string, common_xml)
def test_print_xml1(self): temp_com = Common() xml_string = "<Common><Citations><li>Citation</li></Citations><ExternalLinks><li>Link</li></ExternalLinks><Images><li>Image</li></Images><Videos><li>Video</li></Videos></Common>" root = ET.fromstring(xml_string) temp_com.populate(root) common_xml = temp_com.print_xml() self.assertEqual(xml_string, common_xml)