Commit cf3a1033 authored by Jérome Perrin's avatar Jérome Perrin

test text extraction from a pdf


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21217 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e24695e4
...@@ -665,6 +665,17 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -665,6 +665,17 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
self.portal.portal_catalog(portal_search_text='') self.portal.portal_catalog(portal_search_text='')
self.portal.portal_catalog(portal_search_text='a search text') self.portal.portal_catalog(portal_search_text='a search text')
def test_PDFTextContent(self):
upload_file = makeFileUpload('REF-en-001.pdf')
document = self.portal.portal_contributions.newContent(file=upload_file)
self.assertEquals('PDF', document.getPortalType())
self.assertEquals('I use reference to look up TEST\n',
document._convertToText())
self.assert_('I use reference to look up TEST' in
document._convertToHTML())
self.assert_('I use reference to look up TEST' in
document.SearchableText())
class TestDocumentWithSecurity(ERP5TypeTestCase): class TestDocumentWithSecurity(ERP5TypeTestCase):
......
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