Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
b0abd4c7
Commit
b0abd4c7
authored
Feb 16, 2015
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inventory test: pass from_date to getNextNegativeInventoryDate
This avoid differences like 07:55:27 != 07:55:26 in tests
parent
5639e349
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
product/ERP5/tests/testInventoryAPI.py
product/ERP5/tests/testInventoryAPI.py
+14
-7
No files found.
product/ERP5/tests/testInventoryAPI.py
View file @
b0abd4c7
...
...
@@ -2381,19 +2381,26 @@ class TestNextNegativeInventoryDate(InventoryAPITestCase):
simulation_state
=
'planned'
)
node_uid
=
self
.
node
.
getUid
()
date
=
DateTime
(
DateTime
().
strftime
(
'%Y/%m/%d'
))
self
.
assertEqual
(
getNextNegativeInventoryDate
(
node_uid
=
node_uid
),
None
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
from_date
=
date
,
node_uid
=
node_uid
),
None
)
makeMovement
(
quantity
=
1
,
change_way
=
1
,
start_date
=
date
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
node_uid
=
node_uid
),
None
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
from_date
=
date
,
node_uid
=
node_uid
),
None
)
makeMovement
(
quantity
=
3
,
change_way
=
0
,
start_date
=
date
+
2
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
node_uid
=
node_uid
),
date
+
2
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
from_date
=
date
,
node_uid
=
node_uid
),
date
+
2
)
makeMovement
(
quantity
=
5
,
change_way
=
1
,
start_date
=
date
+
1
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
node_uid
=
node_uid
),
None
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
from_date
=
date
,
node_uid
=
node_uid
),
None
)
makeMovement
(
quantity
=
7
,
change_way
=
0
,
start_date
=
date
+
5
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
node_uid
=
node_uid
),
date
+
5
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
from_date
=
date
,
node_uid
=
node_uid
),
date
+
5
)
makeMovement
(
quantity
=
7
,
change_way
=
1
,
start_date
=
date
+
4
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
node_uid
=
node_uid
),
None
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
from_date
=
date
,
node_uid
=
node_uid
),
None
)
makeMovement
(
quantity
=
7
,
change_way
=
0
,
start_date
=
date
+
3
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
node_uid
=
node_uid
),
date
+
3
)
self
.
assertEqual
(
getNextNegativeInventoryDate
(
from_date
=
date
,
node_uid
=
node_uid
),
date
+
3
)
class
TestInventoryStat
(
InventoryAPITestCase
):
"""Tests Inventory Stat methods.
...
...
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