Commit 16f1e31b 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 69a59dbe
......@@ -923,11 +923,9 @@ return True
url at the url of the image tag. ie:
<image xlink:href="http://www.erp5.com/user-XXX-XXX"
"""
portal = self.portal
module = portal.getDefaultModule(portal_type=portal_type)
upload_file = self.makeFileUpload('user-TESTSVG-BACKGROUND-IMAGE.png')
background_image = module.newContent(portal_type=portal_type,
file=upload_file,
background_image = self.portal.image_module.newContent(
portal_type='Image',
file=self.makeFileUpload('user-TESTSVG-BACKGROUND-IMAGE.png'),
reference="NXD-BACKGROUND")
background_image.publish()
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