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
Nikola Balog
erp5
Commits
0ab5fef4
Commit
0ab5fef4
authored
Oct 14, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Feb 01, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: str(class) result is different between Python 2 and 3.
parent
f9489339
Changes
1
Hide 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 @
0ab5fef4
...
@@ -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