[Erp5-report] r27912 - /erp5/trunk/products/ERP5/tests/testAccountingRules.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jul 3 15:17:53 CEST 2009
Author: luke
Date: Fri Jul 3 15:17:49 2009
New Revision: 27912
URL: http://svn.erp5.org?rev=27912&view=rev
Log:
- update test after addition Trade Model Rule
Modified:
erp5/trunk/products/ERP5/tests/testAccountingRules.py
Modified: erp5/trunk/products/ERP5/tests/testAccountingRules.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testAccountingRules.py?rev=27912&r1=27911&r2=27912&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccountingRules.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testAccountingRules.py [utf8] Fri Jul 3 15:17:49 2009
@@ -1069,11 +1069,14 @@
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(),
More information about the Erp5-report
mailing list