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

fixup! dms: py3

parent 57c8f8ca
Pipeline #33807 failed with stage
in 0 seconds
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
# #
############################################################################## ##############################################################################
import six
import unittest import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import createZODBPythonScript, removeZODBPythonScript from Products.ERP5Type.tests.utils import createZODBPythonScript, removeZODBPythonScript
...@@ -209,11 +210,15 @@ class TestWebCrawler(ERP5TypeTestCase): ...@@ -209,11 +210,15 @@ class TestWebCrawler(ERP5TypeTestCase):
</html>""" </html>"""
web_page.edit(text_content=text_content) web_page.edit(text_content=text_content)
self.assertEqual(web_page.getContentBaseURL(), "http://www.example.com") self.assertEqual(web_page.getContentBaseURL(), "http://www.example.com")
expected_encoded_url = 'http://www.example.com/?title=%E9crit'
if six.PY2:
expected_encoded_url = 'http://www.example.com/?title=\xc3\xa9crit'
self.assertEqual(web_page.getContentNormalisedURLList(), self.assertEqual(web_page.getContentNormalisedURLList(),
["http://www.example.com/I don't care I put what/ I want/", ["http://www.example.com/I don't care I put what/ I want/",
'http://www.example.com/section', 'http://www.example.com/section',
'http://www.example.com/section2', 'http://www.example.com/section2',
'http://www.example.com/?title=\xc3\xa9crit',]) expected_encoded_url,
])
# relative links without base tag # relative links without base tag
text_content = """<html> text_content = """<html>
<head> <head>
......
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