Commit 3bfb155c authored by Łukasz Nowak's avatar Łukasz Nowak

Merge remote-tracking branch 'origin/master' into lazy_simulation_causality

Conflicts:
	bt5/erp5_simulation_test/bt/revision
parents 2dd2efd6 11953a74
......@@ -77,7 +77,6 @@
</permission>
<permission type='tuple'>
<name>View</name>
<role>Anonymous</role>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
......
744
\ No newline at end of file
745
\ No newline at end of file
166
\ No newline at end of file
167
\ No newline at end of file
......@@ -4,3 +4,4 @@
- default rules
- default testers
- some builders
- some solvers, that are only meant for "templates" and should not be used in real applications as they are
\ No newline at end of file
......@@ -2037,6 +2037,37 @@ 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&amp;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'] = 98 # 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" />
''')
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)
def test_convertToImageOnTraversal(self):
"""
Test converting to image all Document portal types on traversal i.e.:
......
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