From 309f4dc6312661a527867e89e8eb25cdd8bb0c42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Fri, 27 Jun 2008 15:58:36 +0000
Subject: [PATCH]  - split out common test string into one, used as
 initialisation for tests

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22047 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../ERP5/tests/testProductionPackingList.py   | 25 ++++++-------------
 1 file changed, 7 insertions(+), 18 deletions(-)

diff --git a/product/ERP5/tests/testProductionPackingList.py b/product/ERP5/tests/testProductionPackingList.py
index 64be5bc110..1e01675a1d 100644
--- a/product/ERP5/tests/testProductionPackingList.py
+++ b/product/ERP5/tests/testProductionPackingList.py
@@ -303,9 +303,8 @@ class TestProductionDelivery(TestProductionPackingReportListMixin):
     Test for sourcing type of delivery (Production Report and Production Packing Lists).
     """
     if not run: return
-    sequence_list = SequenceList()
-    # Check states of deliveries, just after order confirmation
-    sequence_string = self.SOURCING_ORDER_SEQUENCE + '\
+
+    delivery_check_sequence_string = self.SOURCING_ORDER_SEQUENCE + '\
                       CheckSourcingDeliverySimulation \
                       \
                       CheckProducedDeliveryPackingListIsConfirmed \
@@ -321,27 +320,17 @@ class TestProductionDelivery(TestProductionPackingReportListMixin):
                       CheckConsumedReportIsSolved\
                       \
                       '
+
+    sequence_list = SequenceList()
+    # Check states of deliveries, just after order confirmation
+    sequence_string = delivery_check_sequence_string
     sequence_list.addSequenceString(sequence_string)
 
     # Test when packing list are delivered one by one
     # Note: I (Luke) know, that below sequence is long
     #       but I wanted to be sure, that full production
     #       process is doable.
-    sequence_string = self.SOURCING_ORDER_SEQUENCE + '\
-                      CheckSourcingDeliverySimulation \
-                      \
-                      CheckProducedDeliveryPackingListIsConfirmed \
-                      CheckProducedDeliveryPackingListIsSolved\
-                      \
-                      CheckSupplyDeliveryPackingListIsConfirmed \
-                      CheckSupplyDeliveryPackingListIsSolved\
-                      \
-                      CheckProducedReportIsConfirmed \
-                      CheckProducedReportIsSolved\
-                      \
-                      CheckConsumedReportIsConfirmed \
-                      CheckConsumedReportIsSolved\
-                      \
+    sequence_string = delivery_check_sequence_string + '\
                       SetReadyProducedDeliveryPackingList \
                       StartProducedDeliveryPackingList \
                       StopProducedDeliveryPackingList \
-- 
2.30.9