Commit d3811868 authored by Łukasz Nowak's avatar Łukasz Nowak

- update test after addition Trade Model Rule


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27912 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ddc8c0b4
......@@ -1069,11 +1069,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
self.assertEqual( invoice_line.getDestination(),
simulation_movement.getDestination())
# inside this movement there is an applied rule which
# specialize invoice_transaction_rule
# inside this movement there are applied rules which specialize
# invoice_transaction_rule and trade_model_rule...
applied_rule_list = simulation_movement.contentValues()
self.assertEquals( len(applied_rule_list), 1)
applied_rule = applied_rule_list[0]
self.assertEquals( len(applied_rule_list), 2)
# ...but only invoice_transaction_rule is interesting
applied_rule = [applied_rule for applied_rule in applied_rule_list if
applied_rule.getSpecialiseValue().getPortalType() ==
'Invoice Transaction Rule'][0]
self.assertEquals( applied_rule.getPortalType(),
self.applied_rule_portal_type)
self.assertEquals( applied_rule.getSpecialise(),
......
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