diff --git a/product/ERP5/tests/testTradeCondition.py b/product/ERP5/tests/testTradeCondition.py index 9576c9b71a484009673ec9f30ab8606e26c0ecb1..8446bc392be7fdac97d99d1a1fe3e074faa6d41f 100644 --- a/product/ERP5/tests/testTradeCondition.py +++ b/product/ERP5/tests/testTradeCondition.py @@ -1315,9 +1315,11 @@ class TestTaxLineOrderSimulation(AccountingBuildTestCase): self.assertEquals('solved', related_invoice.getCausalityState()) - # Of course, this invoice does not generate simulation again - self.assertEquals([], related_invoice.getCausalityRelatedValueList( - portal_type='Applied Rule')) + # Of course, this invoice does not generate simulation again. An applied + # rule is created, but it is empty. + related_applied_rule = related_invoice.getCausalityRelatedValue( + portal_type='Applied Rule') + self.assertEquals(0, len(related_applied_rule.objectValues())) def test_tax_line_build_accounting(self): base_1 = self.base_amount.newContent( @@ -1397,10 +1399,12 @@ class TestTaxLineOrderSimulation(AccountingBuildTestCase): income_line.getDestinationValue()) self.assertEquals(30, income_line.getSourceCredit()) - # Of course, this invoice does not generate simulation again - self.assertEquals([], related_invoice.getCausalityRelatedValueList( - portal_type='Applied Rule')) - + # Of course, this invoice does not generate simulation again. An applied + # rule is created, but it is empty. + related_applied_rule = related_invoice.getCausalityRelatedValue( + portal_type='Applied Rule') + self.assertEquals(0, len(related_applied_rule.objectValues())) + # and there's no other invoices self.assertEquals(1, len(self.portal.accounting_module.contentValues()))