[Erp5-report] r32025 fabien - /erp5/trunk/products/ERP5/tests/testTransformation.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jan 27 14:16:18 CET 2010


Author: fabien
Date: Wed Jan 27 14:16:14 2010
New Revision: 32025

URL: http://svn.erp5.org?rev=32025&view=rev
Log:
add a test to check the transformation resource is not acquired ont the
transformation lines

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

Modified: erp5/trunk/products/ERP5/tests/testTransformation.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testTransformation.py?rev=32025&r1=32024&r2=32025&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testTransformation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testTransformation.py [utf8] Wed Jan 27 14:16:14 2010
@@ -88,3 +88,30 @@
     # Make sure that the isTested method is working properly on the
     # temp object
     self.assertTrue(aggregated_amount.isTested())
+
+  def test_resourceIsNotAcquiredOnTransformationLines(self):
+    '''
+    We don't want resource define on transformation to be acquired on
+    transformation lines
+    '''
+    transformation = self.createTransformation()
+
+    # create a product
+    portal = self.getPortalObject()
+    product_module = portal.getDefaultModule('Product')
+    product = product_module.newContent(portal_type='Product')
+
+    # set the product as resource of the transformations
+    transformation.setResourceValue(product)
+
+    # add transformations lines and check the don't acquire the resource
+    operation = transformation.newContent(portal_type='Transformation Operation')
+    self.assertEquals(operation.getResource(), None)
+
+    optional_resource = transformation.newContent(portal_type=\
+        'Transformation Optional Resource')
+    self.assertEquals(optional_resource.getResource(), None)
+
+    transformed_resource = transformation.newContent(portal_type=\
+        'Transformation Transformed Resource')
+    self.assertEquals(transformed_resource.getResource(), None)




More information about the Erp5-report mailing list