예제 #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
파일: test_meta.py 프로젝트: davekr/ezodf
 def test_tobytes_without_manipulation(self):
     meta = OfficeDocumentMeta(etree.XML(testdata))
     result = meta.tobytes()
     self.assertTrue(in_XML(result, testdata))