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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
e45d8f64
Commit
e45d8f64
authored
Jan 19, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More failing use cases.
parent
3ff20639
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
product/ERP5OOo/tests/testDms.py
product/ERP5OOo/tests/testDms.py
+20
-1
No files found.
product/ERP5OOo/tests/testDms.py
View file @
e45d8f64
...
...
@@ -2037,8 +2037,27 @@ return 1
web_page_image_size
,
web_page_file_size
=
self
.
getURLSizeList
(
web_page_document_url
,
**
convert_kw
)
self
.
assertTrue
(
max
(
preffered_size_for_display
)
-
max
(
web_page_image_size
)
<=
1
)
# XXX: how to simulate the case when web page contains (through reference) link to document for which based conversion failed?
# XXX: how to fix case when web page contains (through reference) link to itself (causes infinite recursion)
# images from same instance accessed by reference and wrong arguments (dispay NOT display)
# code should be more resilient
upload_file
=
makeFileUpload
(
'cmyk_sample.jpg'
)
image
=
self
.
portal
.
image_module
.
newContent
(
portal_type
=
'Image'
,
reference
=
'Embedded-XXX'
,
version
=
'001'
,
language
=
'en'
)
image
.
publish
()
convert_kw
[
'quality'
]
=
99
# to not get cached
web_page_document
=
self
.
portal
.
web_page_module
.
newContent
(
portal_type
=
"Web Page"
)
web_page_document
.
setTextContent
(
'''<b> test </b><img src="Embedded-XXX?format=jpeg&dispay=medium"/>'''
)
self
.
stepTic
()
web_page_document_url
=
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
web_page_document
.
getRelativeUrl
())
web_page_image_size
,
web_page_file_size
=
self
.
getURLSizeList
(
web_page_document_url
,
**
convert_kw
)
self
.
assertTrue
(
max
(
preffered_size_for_display
)
-
max
(
web_page_image_size
)
<=
1
)
# external images
convert_kw
[
'quality'
]
=
9
5
# to not get cached
convert_kw
[
'quality'
]
=
9
8
# to not get cached
web_page_document
=
self
.
portal
.
web_page_module
.
newContent
(
portal_type
=
"Web Page"
)
web_page_document
.
setTextContent
(
'''<b> test </b><img src="http://www.erp5.com/images/favourite.png"/>
<img style="width: 26px; height: 26px;" src="http://www.erp5.com//images/save2.png" />
...
...
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