Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
8d82d382
Commit
8d82d382
authored
Jan 27, 2017
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testDms: add test to check for visible text in presentation to image conversion
/reviewed-on
!229
parent
1fe4ce2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
product/ERP5OOo/tests/testDms.py
product/ERP5OOo/tests/testDms.py
+20
-0
No files found.
product/ERP5OOo/tests/testDms.py
View file @
8d82d382
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment