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
alecs_myu
erp5
Commits
df144aad
Commit
df144aad
authored
Oct 26, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item: add test for Item_getTrackingList sort
parent
0c194b20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
product/ERP5/tests/testItem.py
product/ERP5/tests/testItem.py
+19
-0
No files found.
product/ERP5/tests/testItem.py
View file @
df144aad
...
...
@@ -1118,6 +1118,25 @@ class TestItemScripts(ERP5TypeTestCase):
self
.
assertEqual
((),
history_item
.
variation_category_item_list
)
self
.
assertEqual
(
'Delivered'
,
history_item
.
simulation_state
)
def
test_Item_getTrackingList_default_sort
(
self
):
# Item_getTrackingList returns lines sorted in chronological order
implicit_movement
=
self
.
portal
.
implicit_item_movement_module
.
newContent
(
portal_type
=
'Implicit Item Movement'
,
destination_value
=
self
.
mirror_node
,
destination_section_value
=
self
.
mirror_section
,
stop_date
=
DateTime
(
2016
,
1
,
1
),
aggregate_value
=
self
.
item
,
)
implicit_movement
.
deliver
()
self
.
_makeSalePackingListLine
(
start_date
=
DateTime
(
2017
,
1
,
1
))
self
.
assertEqual
(
[
DateTime
(
2016
,
1
,
1
),
DateTime
(
2017
,
1
,
1
)],
[
brain
.
date
for
brain
in
self
.
item
.
Item_getTrackingList
()])
self
.
assertEqual
(
[
'Mirror Node'
,
'Node'
],
[
brain
.
node_title
for
brain
in
self
.
item
.
Item_getTrackingList
()])
def
test_item_current_location_and_transit_movement
(
self
):
# a started packing list is still in transit, so we do not know its
# current location until it is delivered.
...
...
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