From 7612620d86ecb98ee58da0126fc5be2bf95a8f0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Thu, 12 Aug 2010 07:23:05 +0000
Subject: [PATCH] remove use of stop date which were introduce for new
 simulation purpose only

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@37734 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../tests/testLegacySimulationPackingList.py  | 39 ++-----------------
 1 file changed, 4 insertions(+), 35 deletions(-)

diff --git a/product/ERP5Legacy/tests/testLegacySimulationPackingList.py b/product/ERP5Legacy/tests/testLegacySimulationPackingList.py
index 7d5ca85230..0a83c2e9cc 100644
--- a/product/ERP5Legacy/tests/testLegacySimulationPackingList.py
+++ b/product/ERP5Legacy/tests/testLegacySimulationPackingList.py
@@ -567,19 +567,6 @@ class TestPackingListMixin(TestOrderMixin):
       simulation_movement.getDeliveryValue().edit(quantity=self.default_quantity-1)
       simulation_movement.expand()
 
-
-  def stepModifySimulationLineStopDate(self,sequence=None, sequence_list=None, **kw):
-    """
-    Modify simulation line stop date
-    """
-    applied_rule = sequence.get('applied_rule')
-    simulation_movement_list = applied_rule.objectValues()
-    resource_list = sequence.get('resource_list')
-    for simulation_movement in simulation_movement_list:
-      simulation_movement.recordProperty('stop_date')
-      simulation_movement.edit(stop_date=self.datetime+15)
-      simulation_movement.expand()
-
   def stepModifySimulationLineStartDate(self,sequence=None, sequence_list=None, **kw):
     """
     Modify simulation line start date
@@ -650,14 +637,6 @@ class TestPackingListMixin(TestOrderMixin):
     self._solveDeliveryGroupDivergence(packing_list, 'start_date',
                                   packing_list.getRelativeUrl())
 
-  def stepUnifyStopDateWithDecision(self,sequence=None, sequence_list=None, **kw):
-    """
-      Solve divergence on stop date using unify
-    """
-    packing_list = sequence.get('packing_list')
-    self._solveDeliveryGroupDivergence(packing_list, 'stop_date',
-                                  packing_list.getRelativeUrl())
-
   def stepUnifyStartDateWithPrevision(self,sequence=None, sequence_list=None, **kw):
     """
       Check if simulation movement are disconnected
@@ -668,16 +647,6 @@ class TestPackingListMixin(TestOrderMixin):
     self._solveDeliveryGroupDivergence(packing_list, 'start_date',
                                   simulation_movement_list[-1].getRelativeUrl())
 
-  def stepUnifyStopDateWithPrevision(self,sequence=None, sequence_list=None, **kw):
-    """
-      Solve divergence on stop date using unify
-    """
-    packing_list = sequence.get('packing_list')
-    applied_rule = sequence.get('applied_rule')
-    simulation_movement_list = applied_rule.objectValues()
-    self._solveDeliveryGroupDivergence(packing_list, 'stop_date',
-                                  simulation_movement_list[-1].getRelativeUrl())
-
   def _solveDeliveryGroupDivergence(self, obj, property, target_url):
     kw = {'delivery_group_listbox':
           {property:{'choice':target_url}}}
@@ -1202,7 +1171,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
                       stepCreateNotVariatedResource \
                       stepModifySimulationLineQuantityForMergedLine \
                       stepModifyOneSimulationLineResource \
-                      stepModifySimulationLineStopDate \
+                      stepModifySimulationLineStartDate \
                       stepTic \
                       stepCheckPackingListIsDiverged \
                       stepAcceptDecisionQuantity \
@@ -1211,7 +1180,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
                       stepAcceptDecisionResource \
                       stepTic \
                       stepCheckPackingListIsDiverged \
-                      stepUnifyStopDateWithDecision \
+                      stepUnifyStartDateWithDecision \
                       stepTic \
                       stepCheckPackingListIsNotDivergent \
                       stepCheckPackingListIsSolved \
@@ -1316,11 +1285,11 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
                       stepSetContainerFullQuantity \
                       stepTic \
                       stepCheckPackingListIsPacked \
-                      stepModifySimulationLineStopDate \
+                      stepModifySimulationLineStartDate \
                       stepTic \
                       stepCheckPackingListIsDiverged \
                       stepCheckPackingListIsDivergent \
-                      stepUnifyStopDateWithPrevision \
+                      stepUnifyStartDateWithPrevision \
                       stepTic \
                       '
     # XXX Check if there is a new packing list created
-- 
2.30.9