Commit 9c7e088f authored by Gabriel Monnerat's avatar Gabriel Monnerat

add test to check issue(Bug #2014) reported by jerome

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@38937 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e258e183
......@@ -102,6 +102,15 @@ class TestOOHandler(cloudoooTestCase):
'odt')
metadata = new_handler.getMetadata()
self.assertEquals(metadata.get('Title'), "cloudooo Test -")
handler = OOHandler(self.tmp_url,
decodestring(data),
'odt')
new_data = handler.setMetadata({"Title": "Namie's working record"})
new_handler = OOHandler(self.tmp_url,
new_data,
'odt')
metadata = new_handler.getMetadata()
self.assertEquals(metadata.get('Title'), "Namie's working record")
def testConvertWithOpenOfficeStopped(self):
"""Test convert with openoffice stopped"""
......
......@@ -520,6 +520,17 @@ class TestServer(cloudoooTestCase):
self.assertEquals(response_dict['meta']['MIMEType'],
'application/vnd.oasis.opendocument.text')
self.assertEquals(response_dict['meta']['Description'], "Music")
setmetadata_result = self.proxy.run_setmetadata('testMetadata.odt',
encodestring(data),
{"Title":"Namie's working record",
"Description": "Music"})
response_code, response_dict, response_message = setmetadata_result
getmetadata_result = self.proxy.run_getmetadata('testMetadata.odt',
response_dict['data'])
response_code, response_dict, response_message = getmetadata_result
self.assertEquals(response_code, 200)
self.assertEquals(response_dict['meta']['title'],
"Namie's working record")
def testRunSetMetadataFailResponse(self):
"""Test run_setmetadata method with invalid document"""
......
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