From f2435400b20eb9141db45528e26aa0df8e4f4880 Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet <nicolas.dumazet@nexedi.com> Date: Wed, 17 Mar 2010 06:59:47 +0000 Subject: [PATCH] getAggregatedAmountList should always receive a context git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33777 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testTransformation.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/product/ERP5/tests/testTransformation.py b/product/ERP5/tests/testTransformation.py index b7b86081e7..d595b5ad6d 100644 --- a/product/ERP5/tests/testTransformation.py +++ b/product/ERP5/tests/testTransformation.py @@ -119,7 +119,13 @@ class TestTransformation(TestTransformationMixin, ERP5TypeTestCase): 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 @@ class TestTransformation(TestTransformationMixin, ERP5TypeTestCase): resource = swimsuit.getRelativeUrl(), ) amount_list = transformation.getAggregatedAmountList(temp_amount) + # fabric + button + sewing self.assertEquals(len(amount_list), 3) for amount in amount_list: -- 2.30.9