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
Labels
Merge Requests
141
Merge Requests
141
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
3a4fe152
Commit
3a4fe152
authored
Apr 17, 2024
by
Carlos Ramos Carreño
Browse files
Options
Browse Files
Download
Plain Diff
Fix erp5_hal_json_style tests in Python 2
See merge request
!1921
parents
8a08fe3b
fc9d60e2
Pipeline
#34104
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py
...plateItem/portal_components/test.erp5.testHalJsonStyle.py
+5
-5
No files found.
bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py
View file @
3a4fe152
...
@@ -22,7 +22,7 @@ import mock
...
@@ -22,7 +22,7 @@ import mock
from
zope.globalrequest
import
setRequest
# pylint: disable=no-name-in-module, import-error
from
zope.globalrequest
import
setRequest
# pylint: disable=no-name-in-module, import-error
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
Products.ERP5Form.Selection
import
Selection
,
DomainSelection
from
Products.ERP5Form.Selection
import
Selection
,
DomainSelection
from
Products.ERP5Type.Utils
import
str2unicode
,
unicode2str
from
Products.ERP5Type.Utils
import
bytes2str
,
str2unicode
,
unicode2str
def
changeSkin
(
skin_name
):
def
changeSkin
(
skin_name
):
...
@@ -3189,11 +3189,11 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin):
...
@@ -3189,11 +3189,11 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin):
))
))
fake_portal
=
replace_request
(
fake_request
,
self
.
portal
)
fake_portal
=
replace_request
(
fake_request
,
self
.
portal
)
result
=
fake_portal
.
web_site_module
.
hateoas
.
foo_module
.
Base_callDialogMethod
(
result
=
bytes2str
(
fake_portal
.
web_site_module
.
hateoas
.
foo_module
.
Base_callDialogMethod
(
dialog_method
=
'Base_viewAsODS'
,
dialog_method
=
'Base_viewAsODS'
,
dialog_id
=
'Base_viewAsODSDialog'
,
dialog_id
=
'Base_viewAsODSDialog'
,
form_id
=
'FooModule_viewFooList'
,
form_id
=
'FooModule_viewFooList'
,
)
.
decode
(
)
))
self
.
assertEqual
(
fake_request
.
get
(
'portal_skin'
),
'ODS'
)
self
.
assertEqual
(
fake_request
.
get
(
'portal_skin'
),
'ODS'
)
self
.
assertEqual
(
fake_request
.
RESPONSE
.
status
,
200
)
self
.
assertEqual
(
fake_request
.
RESPONSE
.
status
,
200
)
if
IS_ZOPE2
:
if
IS_ZOPE2
:
...
@@ -3253,11 +3253,11 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin):
...
@@ -3253,11 +3253,11 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin):
))
))
fake_portal
=
replace_request
(
fake_request
,
self
.
portal
)
fake_portal
=
replace_request
(
fake_request
,
self
.
portal
)
result
=
fake_portal
.
web_site_module
.
hateoas
.
foo_module
.
Base_callDialogMethod
(
result
=
bytes2str
(
fake_portal
.
web_site_module
.
hateoas
.
foo_module
.
Base_callDialogMethod
(
dialog_method
=
'Base_viewAsODS'
,
dialog_method
=
'Base_viewAsODS'
,
dialog_id
=
'Base_viewAsODSDialog'
,
dialog_id
=
'Base_viewAsODSDialog'
,
form_id
=
'FooModule_viewFooList'
,
form_id
=
'FooModule_viewFooList'
,
)
.
decode
(
)
))
self
.
assertEqual
(
fake_request
.
get
(
'portal_skin'
),
'ODS'
)
self
.
assertEqual
(
fake_request
.
get
(
'portal_skin'
),
'ODS'
)
self
.
assertEqual
(
fake_request
.
RESPONSE
.
status
,
200
)
self
.
assertEqual
(
fake_request
.
RESPONSE
.
status
,
200
)
if
IS_ZOPE2
:
if
IS_ZOPE2
:
...
...
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