Пример #1
0
 def test_tostring_subelements(self):
     xmltree = etree.fromstring(testdata)
     result = etree.tostring(xmltree[0], encoding=tostr).strip()
     self.assertTrue(in_XML('<manifest:file-entry '\
                            'manifest:media-type="application/vnd.oasis.opendocument.text" '\
                            'manifest:version="1.2" '\
                            'manifest:full-path="/" />', result))
Пример #2
0
 def test_tobytes_without_manipulation(self):
     meta = OfficeDocumentMeta(etree.XML(testdata))
     result = meta.tobytes()
     self.assertTrue(in_XML(result, testdata))