Commit c8a2768c authored by Jérome Perrin's avatar Jérome Perrin

revert r17164, because it is just hiding the problem.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17165 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7ecd1a3b
...@@ -1393,23 +1393,20 @@ class TestNextNegativeInventoryDate(InventoryAPITestCase): ...@@ -1393,23 +1393,20 @@ class TestNextNegativeInventoryDate(InventoryAPITestCase):
start_date=start_date, start_date=start_date,
simulation_state='planned') simulation_state='planned')
node_uid = self.node.getUid() node_uid = self.node.getUid()
date = DateTime() date = DateTime(DateTime().strftime('%Y/%m/%d'))
self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), None) self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), None)
makeMovement(quantity=1, change_way=1, start_date=date) makeMovement(quantity=1, change_way=1, start_date=date)
self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), None) self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), None)
makeMovement(quantity=3, change_way=0, start_date=date+2) makeMovement(quantity=3, change_way=0, start_date=date+2)
self.assertEquals((date + 2).Date(), self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), date+2)
getNextNegativeInventoryDate(node_uid=node_uid).Date())
makeMovement(quantity=5, change_way=1, start_date=date+1) makeMovement(quantity=5, change_way=1, start_date=date+1)
self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), None) self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), None)
makeMovement(quantity=7, change_way=0, start_date=date+5) makeMovement(quantity=7, change_way=0, start_date=date+5)
self.assertEquals((date + 5).Date(), self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), date+5)
getNextNegativeInventoryDate(node_uid=node_uid).Date())
makeMovement(quantity=7, change_way=1, start_date=date+4) makeMovement(quantity=7, change_way=1, start_date=date+4)
self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), None) self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), None)
makeMovement(quantity=7, change_way=0, start_date=date+3) makeMovement(quantity=7, change_way=0, start_date=date+3)
self.assertEquals((date + 3).Date(), self.assertEquals(getNextNegativeInventoryDate(node_uid=node_uid), date+3)
getNextNegativeInventoryDate(node_uid=node_uid).Date())
class TestInventoryStat(InventoryAPITestCase): class TestInventoryStat(InventoryAPITestCase):
"""Tests Inventory Stat methods. """Tests Inventory Stat methods.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment