Commit e45d8f64 authored by Ivan Tyagov's avatar Ivan Tyagov

More failing use cases.

parent 3ff20639
......@@ -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&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'] = 95 # to not get cached
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" />
......
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