Commit caca45b2 authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño Committed by Jérome Perrin

Fix regression in Python 3.

parent cf2c8ed9
...@@ -39,6 +39,7 @@ from DateTime import DateTime ...@@ -39,6 +39,7 @@ from DateTime import DateTime
from lxml import etree from lxml import etree
from six.moves import range from six.moves import range
from Products.ERP5Type.Utils import unicode2str
def makeFilePath(name): def makeFilePath(name):
import Products.ERP5.tests import Products.ERP5.tests
...@@ -207,7 +208,7 @@ class TestWebDavSupport(ERP5TypeTestCase): ...@@ -207,7 +208,7 @@ class TestWebDavSupport(ERP5TypeTestCase):
# Convert to base format and run conversion into utf-8 # Convert to base format and run conversion into utf-8
self.tic() self.tic()
# Content-Type header is replaced if conversion encoding succeed # Content-Type header is replaced if conversion encoding succeed
new_text_content = text_content.encode('utf8').replace('charset=iso-8859-1', 'charset=utf-8') new_text_content = unicode2str(text_content).replace('charset=iso-8859-1', 'charset=utf-8')
self.assertEqual(web_page_module[filename].getTextContent(), new_text_content) self.assertEqual(web_page_module[filename].getTextContent(), new_text_content)
def test_GET_on_document(self): def test_GET_on_document(self):
......
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