Commit df40af07 authored by Nicolas Delaby's avatar Nicolas Delaby

* pdf size is not predictable according OOo version installed on server

reviewed by romain


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31685 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a74965b3
......@@ -1020,11 +1020,11 @@ class TestDocumentWithSecurity(ERP5TypeTestCase):
'''Check that once the document is converted and cached, its size is
correctly set'''
portal = self.getPortalObject()
document_module = portal.getDefaultModule('Presentation')
pdf_size = 27131 # octets
portal_type = 'Text'
document_module = portal.getDefaultModule(portal_type)
# create a text document in document module
text_document = document_module.newContent(portal_type='Text',
text_document = document_module.newContent(portal_type=portal_type,
reference='Foo_001',
title='Foo_OO1')
f = makeFileUpload('Foo_001.odt')
......@@ -1040,7 +1040,8 @@ class TestDocumentWithSecurity(ERP5TypeTestCase):
self.assertFalse(text_document.hasConversion(format='pdf'))
# call pdf conversion, in this way, the result should be cached
text_document.convert(format='pdf')
mime_type, pdf_data = text_document.convert(format='pdf')
pdf_size = len(pdf_data)
# check there is a cache entry for pdf conversion of this 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