Esempio n. 1
0
 def test_tobytes_without_manipulation(self):
     meta = OfficeDocumentMeta(etree.XML(testdata))
     result = meta.tobytes()
     self.assertTrue(in_XML(result, testdata))
Esempio n. 2
0
 def test_usertag_in_xml_serialisation(self):
     meta = OfficeDocumentMeta()
     meta.usertags['TAG1'] = 'VALUE1'
     self.assertTrue(b'<meta:user-defined meta:name="TAG1">VALUE1</meta:user-defined>' in meta.tobytes())
Esempio n. 3
0
 def test_usertag_with_type_in_xml_serialisation(self):
     meta = OfficeDocumentMeta()
     meta.usertags.set('TAG1', '100.0', 'float')
     self.assertTrue(b'<meta:user-defined meta:name="TAG1" meta:value-type="float">100.0</meta:user-defined>' in meta.tobytes())
Esempio n. 4
0
 def test_keyword_in_xml_serialisation(self):
     meta = OfficeDocumentMeta()
     meta.keywords.add('KEYWORD1')
     self.assertTrue(b'<meta:keyword>KEYWORD1</meta:keyword>' in meta.tobytes())