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

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Dec 28 13:48:48 CET 2009


Author: kazuhiko
Date: Mon Dec 28 13:48:48 2009
New Revision: 31486

URL: http://svn.erp5.org?rev=31486&view=rev
Log:
override stepUnifyStartDateWithDecision 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=31486&r1=31485&r2=31486&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Simulation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Simulation.py [utf8] Mon Dec 28 13:48:48 2009
@@ -437,6 +437,21 @@
     solver_process.buildTargetSolverList()
     solver_process.solve()
 
+  def stepUnifyStartDateWithDecision(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 start_date_solver_decision in filter(
+      lambda x:x.getCausalityValue().getTestedProperty()=='start_date',
+      solver_process.contentValues()):
+      # use StartDate Replacement Solver.
+      start_date_solver_decision.setSolverValue(self.portal.portal_types['Start Date 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