[Erp5-report] r31463 kazuhiko - /erp5/trunk/products/ERP5/tests/testERP5Simulation.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 24 15:28:27 CET 2009


Author: kazuhiko
Date: Thu Dec 24 15:28:26 2009
New Revision: 31463

URL: http://svn.erp5.org?rev=31463&view=rev
Log:
override stepUnifyDestinationWithDecision to use the new simulation API.

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

Modified: erp5/trunk/products/ERP5/tests/testERP5Simulation.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testERP5Simulation.py?rev=31463&r1=31462&r2=31463&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Simulation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Simulation.py [utf8] Thu Dec 24 15:28:26 2009
@@ -422,6 +422,21 @@
                         [x.getOrder() for x in \
                          line.getDeliveryRelatedValueList()])
 
+  def stepUnifyDestinationWithDecision(self,sequence=None, sequence_list=None, **kw):
+    """
+      Check if simulation movement are disconnected
+    """
+    packing_list = sequence.get('packing_list')
+    solver_tool = self.portal.portal_solvers
+    solver_process = solver_tool.newSolverProcess(packing_list)
+    for destination_solver_decision in filter(
+      lambda x:x.getCausalityValue().getTestedProperty()=='destination',
+      solver_process.contentValues()):
+      # use Destination Replacement Solver.
+      destination_solver_decision.setSolverValue(self.portal.portal_types['Destination Replacement Solver'])
+    solver_process.buildTargetSolverList()
+    solver_process.solve()
+
 def test_suite():
   suite = unittest.TestSuite()
   suite.addTest(unittest.makeSuite(TestERP5Simulation))




More information about the Erp5-report mailing list