Commit c0cb8d12 authored by Ivan Tyagov's avatar Ivan Tyagov

Add test to show a failure ot web page to image when more than one external...

Add test to show a failure ot web page to image when more than one external image is used in web page body.
parent 0f46f529
......@@ -2037,6 +2037,18 @@ 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)
# external images
convert_kw['quality'] = 95 # 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