def test_li_print_xml1(self): temp = ET.Element('li') temp.set("href", "HELLO") temp.set("embed", "EMBED") temp.set("text", "TEXT") temp.text = "RANDOMTEXT" temp_li = Li() temp_li.populate(temp) temp_string = temp_li.print_xml() correct_string = "<li> href=\"HELLO\"</li><li> embed=\"EMBED\"</li><li>TEXT</li><li>RANDOMTEXT</li>" self.assertEqual(temp_string, correct_string)
def test_li_print_xml2(self): temp = ET.Element('li') temp.set("href", "fee") temp.set("embed", "foo") temp.set("text", "fi") temp.text = "fum" temp_li = Li() temp_li.populate(temp) temp_string = temp_li.print_xml() correct_string = "<li> href=\"fee\"</li><li> embed=\"foo\"</li><li>fi</li><li>fum</li>" self.assertEqual(temp_string, correct_string)
def test_li_print_xml0(self): temp = ET.Element('li') temp.set("href", "href_stuff") temp.set("embed", "embed_stuff") temp.set("text", "text_stuff") temp.text = "randomfloatingtext" temp_li = Li() temp_li.populate(temp) temp_string = temp_li.print_xml() correct_string = "<li> href=\"href_stuff\"</li><li> embed=\"embed_stuff\"</li><li>text_stuff</li><li>randomfloatingtext</li>" self.assertEqual(temp_string, correct_string)