def test_renderTagWithSingleAttributeAssignedMultipleTimes(self): xml = XmlMaker("form").addAttribute("class", "class_name") xml.addAttribute("class", "default_class") expected_xml = "<form class=\"class_name default_class\"></form>" self.assertEqual(xml.__str__(), expected_xml)
def test_renderTagWithMultipleAttributes(self): xml = XmlMaker("element").addAttribute("id", "test") xml.addAttribute("name", "some_element") expected_xml = "<element id=\"test\" name=\"some_element\"></element>" self.assertEqual(xml.__str__(), expected_xml)