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

add a test for movement with same nodes and same sections with

getMovementHistoryList


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30207 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8b2aacef
......@@ -1488,6 +1488,24 @@ class TestMovementHistoryList(InventoryAPITestCase):
self.assertEquals(2, len(mvt_history_list))
self.assertEquals(0, sum([r.total_quantity for r in mvt_history_list]))
def testSameNodeSameDatesSameSections(self):
getMovementHistoryList = self.getSimulationTool().getMovementHistoryList
mvt = self._makeMovement( quantity=2,
start_date=DateTime(),
source_value=self.node,
destination_value=self.node,
source_section_value=self.section,
destination_section_value=self.section,)
# For now, if you want to get movements from same node, same dates, same
# sections, you have to pass ignore_group_by=True to ignore default
# grouping.
mvt_history_list = getMovementHistoryList(
ignore_group_by=True,
node_uid=self.node.getUid(),
section_uid=self.section.getUid())
self.assertEquals(2, len(mvt_history_list))
self.assertEquals(0, sum([r.total_quantity for r in mvt_history_list]))
def testPrecision(self):
# getMovementHistoryList supports a precision= argument to specify the
# precision to round
......
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