Commit c585900f authored by Jérome Perrin's avatar Jérome Perrin

dms/testERP5WebWithDms: fix test uploading a png in a web page

use Image portal type to store image data. Using a Web Page never made
sense, it was working on python2 because the lax difference between
between text and bytes.

This test a svg contained in various portal types (Image, Web Page, )
with a png background image. The problem was with the background image.
This change does not affect the portal type containing the svg, only
the png background image.
parent ee7084c9
...@@ -923,11 +923,9 @@ return True ...@@ -923,11 +923,9 @@ return True
url at the url of the image tag. ie: url at the url of the image tag. ie:
<image xlink:href="http://www.erp5.com/user-XXX-XXX" <image xlink:href="http://www.erp5.com/user-XXX-XXX"
""" """
portal = self.portal background_image = self.portal.image_module.newContent(
module = portal.getDefaultModule(portal_type=portal_type) portal_type='Image',
upload_file = self.makeFileUpload('user-TESTSVG-BACKGROUND-IMAGE.png') file=self.makeFileUpload('user-TESTSVG-BACKGROUND-IMAGE.png'),
background_image = module.newContent(portal_type=portal_type,
file=upload_file,
reference="NXD-BACKGROUND") reference="NXD-BACKGROUND")
background_image.publish() background_image.publish()
self.tic() self.tic()
......
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