[Erp5-report] r33777 nicolas.dumazet - /erp5/trunk/products/ERP5/tests/testTransformation.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Mar 17 07:59:47 CET 2010


Author: nicolas.dumazet
Date: Wed Mar 17 07:59:47 2010
New Revision: 33777

URL: http://svn.erp5.org?rev=33777&view=rev
Log:
getAggregatedAmountList should always receive a context

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=33777&r1=33776&r2=33777&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testTransformation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testTransformation.py [utf8] Wed Mar 17 07:59:47 2010
@@ -119,7 +119,13 @@
         resource_value=component,
         quantity=1)
     transformed_resource.setTested(True)
-    aggregated_amount_list = transformation.getAggregatedAmountList()
+    from Products.ERP5Type.Document import newTempAmount
+    amount = newTempAmount(transformation, "foobar")
+    amount.edit(
+        quantity = 1.0,
+        resource = component.getRelativeUrl(),
+    )
+    aggregated_amount_list = transformation.getAggregatedAmountList(amount)
     self.assertEquals(len(aggregated_amount_list), 1)
     aggregated_amount = aggregated_amount_list[0]
     # Make sure that the isTested method is working properly on the
@@ -287,6 +293,7 @@
             resource = swimsuit.getRelativeUrl(),
         )
         amount_list = transformation.getAggregatedAmountList(temp_amount)
+
         # fabric + button + sewing
         self.assertEquals(len(amount_list), 3)
         for amount in amount_list:




More information about the Erp5-report mailing list