Commit 428c4266 authored by Nicolas Delaby's avatar Nicolas Delaby

Extend Test of PDF conversion to check that

PDF higher than A3 (surface) can not be converted into Image.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35758 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9dfe6921
......@@ -169,6 +169,7 @@ class TestDocumentMixin(ERP5TypeTestCase):
"""
Remove everything after each run
"""
transaction.abort()
doc_module = self.getDocumentModule()
doc_module.manage_delObjects(list(doc_module.objectIds()))
transaction.commit()
......@@ -1696,6 +1697,10 @@ style=3D'color:black'>05D65812<o:p></o:p></span></p>
upload_file = makeFileUpload('TEST.Embedded.Image.pdf')
document = module.newContent(portal_type=portal_type, file=upload_file)
self.assertEquals(document.asText(), 'ERP5 is a free software.\n')
upload_file = makeFileUpload('TEST.Large.Document.pdf')
document = module.newContent(portal_type=portal_type, file=upload_file)
from AccessControl import Unauthorized
self.assertRaises(Unauthorized, document.asText)
class TestDocumentWithSecurity(TestDocumentMixin):
......
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