From 49a08c42052c6a1bf9bd06df01857956d92ec056 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Mon, 28 Dec 2009 12:48:48 +0000
Subject: [PATCH] override stepUnifyStartDateWithDecision to use the new
 simulation API.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31486 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testERP5Simulation.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/product/ERP5/tests/testERP5Simulation.py b/product/ERP5/tests/testERP5Simulation.py
index 8127750a4c..e0a9291efa 100644
--- a/product/ERP5/tests/testERP5Simulation.py
+++ b/product/ERP5/tests/testERP5Simulation.py
@@ -437,6 +437,21 @@ class TestERP5SimulationPackingList(TestERP5SimulationMixin, TestPackingList):
     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))
-- 
2.30.9