Commit cc056e32 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

testInvoice: pick an applied rule with specialise reference explicitly.

parent bbd512f6
...@@ -102,7 +102,8 @@ class TestInvoice(TestInvoiceMixin): ...@@ -102,7 +102,8 @@ class TestInvoice(TestInvoiceMixin):
delivery_movement = delivery_applied_rule.contentValues()[0] delivery_movement = delivery_applied_rule.contentValues()[0]
invoice_applied_rule = delivery_movement.contentValues()[0] invoice_applied_rule = delivery_movement.contentValues()[0]
invoice_movement = invoice_applied_rule.contentValues()[0] invoice_movement = invoice_applied_rule.contentValues()[0]
invoice_transaction_applied_rule = invoice_movement.contentValues()[0] invoice_transaction_applied_rule = [x for x in invoice_movement.contentValues() \
if x.getSpecialiseReference() == 'default_invoice_transaction_rule'][0]
invoice_transaction_movement =\ invoice_transaction_movement =\
invoice_transaction_applied_rule.contentValues()[0] invoice_transaction_applied_rule.contentValues()[0]
self.assertEqual(currency, self.assertEqual(currency,
...@@ -349,7 +350,8 @@ class TestInvoice(TestInvoiceMixin): ...@@ -349,7 +350,8 @@ class TestInvoice(TestInvoiceMixin):
delivery_movement = delivery_applied_rule.contentValues()[0] delivery_movement = delivery_applied_rule.contentValues()[0]
invoice_applied_rule = delivery_movement.contentValues()[0] invoice_applied_rule = delivery_movement.contentValues()[0]
invoice_movement = invoice_applied_rule.contentValues()[0] invoice_movement = invoice_applied_rule.contentValues()[0]
invoice_transaction_applied_rule = invoice_movement.contentValues()[0] invoice_transaction_applied_rule = [x for x in invoice_movement.contentValues() \
if x.getSpecialiseReference() == 'default_invoice_transaction_rule'][0]
# utility function to return the simulation movement that should be used # utility function to return the simulation movement that should be used
# for "income" line # for "income" line
......
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