Exemple #1
0
 def test_docencoding(self):
     import pomtest
     doc = POM.POMDocument(dtd=pomtest)
     doc.set_encoding("iso-8859-1")
     self.assertEqual(doc.encoding, "iso-8859-1")
Exemple #2
0
 def test_6POMemit(self):
     import pomtest
     doc = POM.POMDocument(dtd=pomtest)
     doc.set_root(pomtest.Toplevel())
     doc.root.idval = "someid"  # satisfy #REQUIRED attribute
     doc.emit(sys.stdout)
Exemple #3
0
 def test_negdocencoding(self):
     import pomtest
     doc = POM.POMDocument(dtd=pomtest)
     self.assertRaises(ValueError, doc.set_encoding, "xxx")
Exemple #4
0
 def test_5POMvalidation(self):
     import pomtest # previous test just created this.
     doc = POM.POMDocument(dtd=pomtest)
     doc.set_root(pomtest.Toplevel())
     self.assertRaises(POM.ValidationError, str, doc)