Commit 6b1b1a62 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* assert mirrored case for built payment transaction.

* configure payment rule for each test.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33360 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee1fe65e
...@@ -1502,6 +1502,18 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1502,6 +1502,18 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
} }
for payment_transaction_line in payment_transaction_line_list : for payment_transaction_line in payment_transaction_line_list :
if _isMirrored(payment_transaction_line):
self.assert_(
payment_transaction_line.getDestinationId() in accounting_lines_layout.keys(),
'unexepected source_id %s' % payment_transaction_line.getDestinationId())
debit, credit = accounting_lines_layout[
payment_transaction_line.getDestinationId()]
self.assertEquals(debit, payment_transaction_line.getDestinationDebit())
self.assertEquals(credit, payment_transaction_line.getDestinationCredit())
self.assertNotEquals(
len(payment_transaction_line.getDeliveryRelatedValueList(
portal_type='Simulation Movement')), 0)
else:
self.assert_( self.assert_(
payment_transaction_line.getSourceId() in accounting_lines_layout.keys(), payment_transaction_line.getSourceId() in accounting_lines_layout.keys(),
'unexepected source_id %s' % payment_transaction_line.getSourceId()) 'unexepected source_id %s' % payment_transaction_line.getSourceId())
...@@ -2076,8 +2088,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -2076,8 +2088,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepTic
stepUpdateInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepCreatePaymentRule
stepUpdatePaymentRuleMatrix
stepValidateInvoiceTransaction stepValidateInvoiceTransaction
stepTic stepTic
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
...@@ -2114,8 +2127,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -2114,8 +2127,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepTic
stepUpdateInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepCreatePaymentRule
stepUpdatePaymentRuleMatrix
stepValidateInvoiceTransaction stepValidateInvoiceTransaction
stepTic stepTic
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
......
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