Commit 4e2cf48c authored by Jérome Perrin's avatar Jérome Perrin

exercise basic pdf to image conversion


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28828 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 126064b9
......@@ -762,6 +762,17 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assert_('I use reference to look up TEST' in
document.SearchableText())
def test_PDFToImage(self):
upload_file = makeFileUpload('REF-en-001.pdf')
document = self.portal.portal_contributions.newContent(file=upload_file)
self.assertEquals('PDF', document.getPortalType())
content_type, image_data = document.convert(format='png',
frame=0,
display='thumbnail')
# it's a valid PNG
self.assertEquals('PNG', image_data[1:4])
class TestDocumentWithSecurity(ERP5TypeTestCase):
username = 'yusei'
......
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