Commit 789e152d authored by Emmy Vouriot's avatar Emmy Vouriot Committed by Jérome Perrin

change bytes to str WIP

parent 7e2cd471
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
from __future__ import print_function from __future__ import print_function
import unittest import unittest
import six
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from Testing import ZopeTestCase from Testing import ZopeTestCase
...@@ -128,6 +129,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -128,6 +129,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
text_content -- the embedded text content text_content -- the embedded text content
""" """
if six.PY2:
html_text = html_text.encode('utf-8') html_text = html_text.encode('utf-8')
match_string1 = 'data-gadget-editable="field_%s"' % field_id match_string1 = 'data-gadget-editable="field_%s"' % field_id
match_string2 = 'data-gadget-value="%s"' % html_quote(text_content) match_string2 = 'data-gadget-value="%s"' % html_quote(text_content)
...@@ -153,6 +155,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -153,6 +155,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
text_content -- the embedded text content text_content -- the embedded text content
""" """
if six.PY2:
html_text = html_text.encode('utf-8') html_text = html_text.encode('utf-8')
match_string1 = 'data-gadget-editable="field_%s"' % field_id match_string1 = 'data-gadget-editable="field_%s"' % field_id
match_string2 = 'data-gadget-value="%s"' % html_quote(text_content) match_string2 = 'data-gadget-value="%s"' % html_quote(text_content)
...@@ -179,6 +182,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -179,6 +182,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
document -- the document which content is displayed in document -- the document which content is displayed in
read only mode read only mode
""" """
if six.PY2:
html_text = html_text.encode('utf-8') html_text = html_text.encode('utf-8')
match_string1 = "data-gadget-editable=" match_string1 = "data-gadget-editable="
match_string2 = 'data-gadget-value="%s"' % html_quote(text_content) match_string2 = 'data-gadget-value="%s"' % html_quote(text_content)
......
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