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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
erp5
Commits
bfa62b51
Commit
bfa62b51
authored
Jul 24, 2018
by
Valentin Benozillo
Committed by
Tristan Cavelier
Jul 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testDms.py: Changes to fit the new Tesseract outputs
/reviewed-on
nexedi/erp5!713
parent
ed8a7503
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
product/ERP5OOo/tests/testDms.py
product/ERP5OOo/tests/testDms.py
+3
-3
No files found.
product/ERP5OOo/tests/testDms.py
View file @
bfa62b51
...
@@ -1455,7 +1455,7 @@ class TestDocument(TestDocumentMixin):
...
@@ -1455,7 +1455,7 @@ class TestDocument(TestDocumentMixin):
upload_file
=
makeFileUpload
(
'cmyk_sample.jpg'
)
upload_file
=
makeFileUpload
(
'cmyk_sample.jpg'
)
document
=
self
.
portal
.
portal_contributions
.
newContent
(
file
=
upload_file
)
document
=
self
.
portal
.
portal_contributions
.
newContent
(
file
=
upload_file
)
self
.
assertEqual
(
'Image'
,
document
.
getPortalType
())
self
.
assertEqual
(
'Image'
,
document
.
getPortalType
())
self
.
assertEqual
(
'ERP5 is a free software
\
n
\
n
'
,
document
.
asText
())
self
.
assertEqual
(
'ERP5 is a free software
.
\
n
\
x0c
'
,
document
.
asText
())
def
test_MonochromeImageResize
(
self
):
def
test_MonochromeImageResize
(
self
):
upload_file
=
makeFileUpload
(
'monochrome_sample.tiff'
)
upload_file
=
makeFileUpload
(
'monochrome_sample.tiff'
)
...
@@ -1464,7 +1464,7 @@ class TestDocument(TestDocumentMixin):
...
@@ -1464,7 +1464,7 @@ class TestDocument(TestDocumentMixin):
resized_image
=
document
.
convert
(
format
=
'png'
,
display
=
'small'
)[
1
]
resized_image
=
document
.
convert
(
format
=
'png'
,
display
=
'small'
)[
1
]
identify_output
=
Popen
([
'identify'
,
'-verbose'
,
'-'
],
stdin
=
PIPE
,
stdout
=
PIPE
).
communicate
(
resized_image
)[
0
]
identify_output
=
Popen
([
'identify'
,
'-verbose'
,
'-'
],
stdin
=
PIPE
,
stdout
=
PIPE
).
communicate
(
resized_image
)[
0
]
self
.
assertFalse
(
'1-bit'
in
identify_output
)
self
.
assertFalse
(
'1-bit'
in
identify_output
)
self
.
assertEqual
(
'ERP5 is a free software
\
n
\
n
'
,
document
.
asText
())
self
.
assertEqual
(
'ERP5 is a free software
.
\
n
\
x0c
'
,
document
.
asText
())
def
test_Base_showFoundText
(
self
):
def
test_Base_showFoundText
(
self
):
# Create document with good content
# Create document with good content
...
@@ -2032,7 +2032,7 @@ document.write('<sc'+'ript type="text/javascript" src="http://somosite.bg/utb.ph
...
@@ -2032,7 +2032,7 @@ document.write('<sc'+'ript type="text/javascript" src="http://somosite.bg/utb.ph
module
=
self
.
portal
.
getDefaultModule
(
portal_type
)
module
=
self
.
portal
.
getDefaultModule
(
portal_type
)
upload_file
=
makeFileUpload
(
'TEST.Embedded.Image.pdf'
)
upload_file
=
makeFileUpload
(
'TEST.Embedded.Image.pdf'
)
document
=
module
.
newContent
(
portal_type
=
portal_type
,
file
=
upload_file
)
document
=
module
.
newContent
(
portal_type
=
portal_type
,
file
=
upload_file
)
self
.
assertEqual
(
document
.
asText
(),
'ERP5 is a free software.
\
n
\
n
'
)
self
.
assertEqual
(
document
.
asText
(),
'ERP5 is a free software.
\
n
\
n
\
n
\
x0c
'
)
def
createRestrictedSecurityHelperScript
(
self
):
def
createRestrictedSecurityHelperScript
(
self
):
script_content_list
=
[
'format=None, **kw'
,
"""
script_content_list
=
[
'format=None, **kw'
,
"""
...
...
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