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): ...@@ -1020,11 +1020,11 @@ class TestDocumentWithSecurity(ERP5TypeTestCase):
'''Check that once the document is converted and cached, its size is '''Check that once the document is converted and cached, its size is
correctly set''' correctly set'''
portal = self.getPortalObject() portal = self.getPortalObject()
document_module = portal.getDefaultModule('Presentation') portal_type = 'Text'
pdf_size = 27131 # octets document_module = portal.getDefaultModule(portal_type)
# create a text document in document module # 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', reference='Foo_001',
title='Foo_OO1') title='Foo_OO1')
f = makeFileUpload('Foo_001.odt') f = makeFileUpload('Foo_001.odt')
...@@ -1040,7 +1040,8 @@ class TestDocumentWithSecurity(ERP5TypeTestCase): ...@@ -1040,7 +1040,8 @@ class TestDocumentWithSecurity(ERP5TypeTestCase):
self.assertFalse(text_document.hasConversion(format='pdf')) self.assertFalse(text_document.hasConversion(format='pdf'))
# call pdf conversion, in this way, the result should be cached # 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 # 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