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
143
Merge Requests
143
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
2465eb1f
Commit
2465eb1f
authored
Oct 14, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Dec 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: str(class) result is different between Python 2 and 3.
parent
99a42a34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
product/ERP5/tests/testInventoryAPI.py
product/ERP5/tests/testInventoryAPI.py
+2
-2
No files found.
product/ERP5/tests/testInventoryAPI.py
View file @
2465eb1f
...
@@ -900,7 +900,7 @@ class TestInventoryList(InventoryAPITestCase):
...
@@ -900,7 +900,7 @@ class TestInventoryList(InventoryAPITestCase):
getInventoryList
=
self
.
getSimulationTool
().
getInventoryList
getInventoryList
=
self
.
getSimulationTool
().
getInventoryList
inventory_list
=
getInventoryList
()
inventory_list
=
getInventoryList
()
self
.
assertEqual
(
str
(
inventory_list
.
__class__
),
self
.
assertEqual
(
str
(
inventory_list
.
__class__
),
'Shared.DC.ZRDB.Results.Results'
)
'Shared.DC.ZRDB.Results.Results'
if
six
.
PY2
else
"<class 'Shared.DC.ZRDB.Results.Results'>"
)
# the brain is InventoryListBrain
# the brain is InventoryListBrain
self
.
assertIn
(
'InventoryListBrain'
,
self
.
assertIn
(
'InventoryListBrain'
,
[
c
.
__name__
for
c
in
inventory_list
.
_class
.
__bases__
])
[
c
.
__name__
for
c
in
inventory_list
.
_class
.
__bases__
])
...
@@ -1711,7 +1711,7 @@ class TestMovementHistoryList(InventoryAPITestCase):
...
@@ -1711,7 +1711,7 @@ class TestMovementHistoryList(InventoryAPITestCase):
getMovementHistoryList
=
self
.
getSimulationTool
().
getMovementHistoryList
getMovementHistoryList
=
self
.
getSimulationTool
().
getMovementHistoryList
mvt_history_list
=
getMovementHistoryList
()
mvt_history_list
=
getMovementHistoryList
()
self
.
assertEqual
(
str
(
mvt_history_list
.
__class__
),
self
.
assertEqual
(
str
(
mvt_history_list
.
__class__
),
'Shared.DC.ZRDB.Results.Results'
)
'Shared.DC.ZRDB.Results.Results'
if
six
.
PY2
else
"<class 'Shared.DC.ZRDB.Results.Results'>"
)
# default is an empty list
# default is an empty list
self
.
assertEqual
(
0
,
len
(
mvt_history_list
))
self
.
assertEqual
(
0
,
len
(
mvt_history_list
))
...
...
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