Commit 8d82d382 authored by Tristan Cavelier's avatar Tristan Cavelier

testDms: add test to check for visible text in presentation to image conversion

/reviewed-on !229
parent 1fe4ce2c
......@@ -1425,6 +1425,26 @@ class TestDocument(TestDocumentMixin):
self.assertNotEqual(original_document.getData(),
watermarked_document.getData())
def test_checkVisibleTextInPresentationToImageConversion(self):
odp = makeFileUpload("TEST-en-003.odp")
presentation = self.portal.document_module.newContent(
portal_type="Presentation",
data=odp,
content_type="application/vnd.oasis.opendocument.presentation",
)
self.tic()
content_type, png = presentation.convert(format="png")
self.assertEquals(content_type, "image/png")
image = self.portal.image_module.newContent(
portal_type="Image",
data=png,
content_type=content_type,
)
self.tic()
content_type, txt = image.convert(format="txt")
self.assertEquals(content_type, "text/plain")
self.assertIn("ERP5 DMS page 1", txt)
def test_Document_getStandardFilename(self):
upload_file = makeFileUpload('metadata.pdf')
document = self.portal.document_module.newContent(portal_type='PDF')
......
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