From 9cc88da02200c3db3aab8415172ff949de3997ab Mon Sep 17 00:00:00 2001 From: Mame Coumba Sall <mame@nexedi.com> Date: Thu, 5 Nov 2009 09:54:04 +0000 Subject: [PATCH] Modified to test inventory if movement is added in the future git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30328 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testInventoryAPI.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/product/ERP5/tests/testInventoryAPI.py b/product/ERP5/tests/testInventoryAPI.py index 84e35af0fa..8cf1f0f647 100644 --- a/product/ERP5/tests/testInventoryAPI.py +++ b/product/ERP5/tests/testInventoryAPI.py @@ -2275,18 +2275,17 @@ class TestInventoryDocument(InventoryAPITestCase): # the brain is not a zsqlbrain instance here, so it does not # have getPath(). return [x.path for x in resource.getCurrentInventoryList(**kw)] - + # use optimisation - self.assertTrue(movement.getPath() in getCurrentInventoryPathList( - self.resource, - node_uid=self.node_uid, - from_date=movement.getStartDate())) + self.assertEquals(True,movement.getPath() in + [x.path for x in self.resource.getInventoryList( + mirror_uid=self.mirror_node.getUid())]) # without optimisation - self.assertTrue(movement.getPath() in getCurrentInventoryPathList( - self.resource, - optimisation__=False, - from_date=movement.getStartDate())) + self.assertEquals(True,movement.getPath() in + [x.path for x in self.resource.getInventoryList( + optimisation__=False, + mirror_uid=self.mirror_node.getUid())]) class TestUnitConversion(InventoryAPITestCase): QUANTITY_UNIT_CATEGORIES = { -- 2.30.9