Commit d968d7fb authored by Hugo H. Maia Vieira's avatar Hugo H. Maia Vieira

Add parsed_content as an attribute for IOdfDocument


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@41087 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f3c065a8
......@@ -64,6 +64,7 @@ class IOdfDocument(Interface):
"""Manipulates odf documents in memory"""
source_format = Attribute("Document Extension")
parsed_content = Attribute("Content.xml parsed with lxml")
def getContentXml():
"""Returns the content.xml file as string"""
......
......@@ -81,9 +81,10 @@ class TestInterface(unittest.TestCase):
def testIOdfDocument(self):
"""Test if OdfDocument implements IOdfDocument"""
self.assertEquals(IOdfDocument.implementedBy(OdfDocument), True)
method_list = ['getFile',
'getContentXml',
'source_format']
method_list = ['getContentXml',
'parsed_content',
'source_format',
'getFile',]
self.assertEquals(IOdfDocument.names(), method_list)
def testIFilter(self):
......@@ -106,7 +107,7 @@ class TestInterface(unittest.TestCase):
self.assertEquals(len(method_list), len(IManager.names()))
self.assertEquals(IManager.get('convertFile').required, ('file',
'source_format', 'destination_format', 'zip'))
'source_format', 'destination_format', 'zip', 'refresh'))
self.assertEquals(IManager.get('getAllowedExtensionList').required,
('request_dict',))
self.assertEquals(IManager.get('getFileMetadataItemList').required,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment