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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
87921eee
Commit
87921eee
authored
Mar 06, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! HalJsonStyle: py3 (OK py2)
parent
7d32ae95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py
...plateItem/portal_components/test.erp5.testHalJsonStyle.py
+7
-4
No files found.
bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py
View file @
87921eee
...
...
@@ -1333,9 +1333,10 @@ class TestERP5Document_getHateoas_mode_traverse(ERP5HALJSONStyleSkinsMixin):
"application/hal+json"
)
result_dict = json.loads(result)
self.assertEqual(result_dict['
_embedded
']['
_view
']['
my_title
']['
default
'], u'
\
ufffd
\
ufffd
\
ufffd
')
self.assertEqual(result_dict['
title
'], u'
\
ufffd
\
ufffd
\
ufffd
')
self.assertEqual(result_dict['
_embedded
']['
_view
']['
_links
']['
traversed_document
']['
title
'], u'
\
ufffd
\
ufffd
\
ufffd
')
expected = u'
\
ufffd
\
ufffd
\
ufffd
' if six.PY2 else u'
\
udce9
\
udccf
\
udcf3
\
udcaf
'
self.assertEqual(result_dict['
_embedded
']['
_view
']['
my_title
']['
default
'], expected)
self.assertEqual(result_dict['
title
'], expected)
self.assertEqual(result_dict['
_embedded
']['
_view
']['
_links
']['
traversed_document
']['
title
'], expected)
class TestERP5Document_getHateoas_mode_search(ERP5HALJSONStyleSkinsMixin):
...
...
@@ -2442,7 +2443,9 @@ return context.getPortalObject().portal_catalog(portal_type='Foo', sort_on=[('id
result_dict
=
json
.
loads
(
result
)
self
.
assertEqual
(
len
(
result_dict
[
'_embedded'
][
'contents'
]),
1
)
self
.
assertEqual
(
result_dict
[
'_embedded'
][
'contents'
][
0
][
"title"
],
u'
\
ufffd
\
ufffd
\
ufffd
'
)
self
.
assertEqual
(
result_dict
[
'_embedded'
][
'contents'
][
0
][
"title"
],
u'
\
ufffd
\
ufffd
\
ufffd
'
if
six
.
PY2
else
u'
\
udce9
\
udccf
\
udcf3
\
udcaf
'
)
class
TestERP5Person_getHateoas_mode_search
(
ERP5HALJSONStyleSkinsMixin
):
...
...
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