[Erp5-report] r22226 - /erp5/trunk/products/ERP5/tests/testProductionOrder.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 2 19:33:11 CEST 2008


Author: luke
Date: Wed Jul  2 19:33:09 2008
New Revision: 22226

URL: http://svn.erp5.org?rev=22226&view=rev
Log:
 - added cases that invalidated transformation won't be set automatically, and that in case of invalidated and other, the other will be set

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

Modified: erp5/trunk/products/ERP5/tests/testProductionOrder.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testProductionOrder.py?rev=22226&r1=22225&r2=22226&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testProductionOrder.py (original)
+++ erp5/trunk/products/ERP5/tests/testProductionOrder.py Wed Jul  2 19:33:09 2008
@@ -156,6 +156,22 @@
     )
     sequence.edit(component2=resource)
 
+  def stepInvalidateTransformation(self, sequence=None, sequence_list=None,
+                               **kw):
+    transformation = sequence.get('transformation')
+
+    # XXX: rc user from testOrder is not able to doActionFor ???
+    transformation.invalidate()
+    self.assertEquals('invalidated',transformation.getValidationState())
+
+  def stepValidateTransformation(self, sequence=None, sequence_list=None,
+                               **kw):
+    transformation = sequence.get('transformation')
+
+    # XXX: rc user from testOrder is not able to doActionFor ???
+    transformation.validate()
+    self.assertEquals('validated',transformation.getValidationState())
+
   def stepCreateTransformation(self, sequence=None, sequence_list=None,
                                **kw):
     """
@@ -1140,6 +1156,37 @@
     self.operation_line_portal_type = 'Transformation Operation'
     self.resource_portal_type = 'Product'
 
+    # Note: Below are cases only for non-apparel - as there is no validation
+    # worklow for Apparel Transformation
+
+    # case of invalidated Transformation
+    sequence_string = bootstrap_sequence_string + '\
+                      CreateTransformation \
+                      Tic \
+                      ValidateTransformation \
+                      InvalidateTransformation \
+                      Tic \
+                      CreateOrderLineWithoutTransformation \
+                      Tic \
+                      CheckOrderLineTransformationIsNotSet \
+                      '
+    sequence_list.addSequenceString(sequence_string)
+
+    # case of invalidated Transformation and other
+    sequence_string = bootstrap_sequence_string + '\
+                      CreateTransformation \
+                      Tic \
+                      ValidateTransformation \
+                      InvalidateTransformation \
+                      Tic \
+                      CreateTransformation \
+                      Tic \
+                      CreateOrderLineWithoutTransformation \
+                      Tic \
+                      CheckOrderLineTransformationIsSet \
+                      '
+    sequence_list.addSequenceString(sequence_string)
+
     sequence_list.play(self)
     
   def test_50_testCopyPaste(self, quiet=0, run=run_all_test):




More information about the Erp5-report mailing list