def test_TemplateXMLTreeBuilder_nosub(self):
     txtb = xml_utils.TemplateXMLTreeBuilder()
     # elementree pukes on identifiers starting with $
     txtb.feed(self.RESULTCHECK)
     et = txtb.close()
     result = ElementTree.tostring(et)
     self.assertEqual(result, self.RESULTCHECK)
Esempio n. 2
0
 def test_TemplateXMLTreeBuilder_nosub(self):
     txtb = xml_utils.TemplateXMLTreeBuilder()
     # elementree pukes on identifiers starting with $
     txtb.feed(self.RESULTCHECK)
     et = txtb.close()
     result = ElementTree.tostring(et)
     self.assertEqual(result, self.RESULTCHECK)
 def test_TemplateXML(self):
     tx = xml_utils.TemplateXML(self.FULLREPLACE, **self.MAPPING)
     et = ElementTree.ElementTree(None, tx.name)
     check = ElementTree.tostring(et.getroot())
     self.assertEqual(check, self.RESULTCHECK)
 def test_MappingTreeBuilder_standalone(self):
     txtb = xml_utils.TemplateXMLTreeBuilder(**self.MAPPING)
     txtb.feed(self.FULLREPLACE)
     et = txtb.close()
     result = ElementTree.tostring(et)
     self.assertEqual(result, self.RESULTCHECK)
Esempio n. 5
0
 def test_TemplateXML(self):
     tx = xml_utils.TemplateXML(self.FULLREPLACE, **self.MAPPING)
     et = ElementTree.ElementTree(None, tx.name)
     check = ElementTree.tostring(et.getroot())
     self.assertEqual(check, self.RESULTCHECK)
Esempio n. 6
0
 def test_MappingTreeBuilder_standalone(self):
     txtb = xml_utils.TemplateXMLTreeBuilder(**self.MAPPING)
     txtb.feed(self.FULLREPLACE)
     et = txtb.close()
     result = ElementTree.tostring(et)
     self.assertEqual(result, self.RESULTCHECK)