Commit f2435400 authored by Nicolas Dumazet's avatar Nicolas Dumazet

getAggregatedAmountList should always receive a context


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33777 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a7155c4e
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment