Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
6fb058e2
Commit
6fb058e2
authored
Jul 21, 2023
by
Emmy Vouriot
Committed by
Jérome Perrin
Feb 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change bytes to str WIP
parent
e2e1339f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testEditorField.py
...mplateItem/portal_components/test.erp5.testEditorField.py
+7
-3
No files found.
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testEditorField.py
View file @
6fb058e2
...
@@ -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,7 +129,8 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -128,7 +129,8 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
text_content -- the embedded text content
text_content -- the embedded text content
"""
"""
html_text
=
html_text
.
encode
(
'utf-8'
)
if
six
.
PY2
:
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
)
if
html_text
.
find
(
match_string1
)
==
-
1
:
if
html_text
.
find
(
match_string1
)
==
-
1
:
...
@@ -153,7 +155,8 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -153,7 +155,8 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
text_content -- the embedded text content
text_content -- the embedded text content
"""
"""
html_text
=
html_text
.
encode
(
'utf-8'
)
if
six
.
PY2
:
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
)
if
html_text
.
find
(
match_string1
)
==
-
1
:
if
html_text
.
find
(
match_string1
)
==
-
1
:
...
@@ -179,7 +182,8 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -179,7 +182,8 @@ 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
"""
"""
html_text
=
html_text
.
encode
(
'utf-8'
)
if
six
.
PY2
:
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
)
if
html_text
.
find
(
match_string1
)
!=
-
1
:
if
html_text
.
find
(
match_string1
)
!=
-
1
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment