[Erp5-report] r30328 - /erp5/trunk/products/ERP5/tests/testInventoryAPI.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Nov 5 10:54:06 CET 2009


Author: mame
Date: Thu Nov  5 10:54:04 2009
New Revision: 30328

URL: http://svn.erp5.org?rev=30328&view=rev
Log:
Modified to test inventory if movement is added in the future

Modified:
    erp5/trunk/products/ERP5/tests/testInventoryAPI.py

Modified: erp5/trunk/products/ERP5/tests/testInventoryAPI.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInventoryAPI.py?rev=30328&r1=30327&r2=30328&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInventoryAPI.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testInventoryAPI.py [utf8] Thu Nov  5 10:54:04 2009
@@ -2275,18 +2275,17 @@
       # 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 = {




More information about the Erp5-report mailing list