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,16 +1502,28 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
}
for payment_transaction_line in payment_transaction_line_list :
self.assert_(
payment_transaction_line.getSourceId() in accounting_lines_layout.keys(),
'unexepected source_id %s' % payment_transaction_line.getSourceId())
debit, credit = accounting_lines_layout[
payment_transaction_line.getSourceId()]
self.assertEquals(debit, payment_transaction_line.getSourceDebit())
self.assertEquals(credit, payment_transaction_line.getSourceCredit())
self.assertNotEquals(
len(payment_transaction_line.getDeliveryRelatedValueList(
portal_type='Simulation Movement')), 0)
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_(
payment_transaction_line.getSourceId() in accounting_lines_layout.keys(),
'unexepected source_id %s' % payment_transaction_line.getSourceId())
debit, credit = accounting_lines_layout[
payment_transaction_line.getSourceId()]
self.assertEquals(debit, payment_transaction_line.getSourceDebit())
self.assertEquals(credit, payment_transaction_line.getSourceCredit())
self.assertNotEquals(
len(payment_transaction_line.getDeliveryRelatedValueList(
portal_type='Simulation Movement')), 0)
def stepRebuildAndCheckNothingIsCreated(self, sequence, **kw) :
""" Calls the DeliveryBuilder again and checks that the accounting module
......@@ -2076,8 +2088,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateCurrencies
stepCreateProducts
stepCreateInvoiceTransactionRule
stepTic
stepUpdateInvoiceTransactionRuleMatrix
stepCreatePaymentRule
stepUpdatePaymentRuleMatrix
stepValidateInvoiceTransaction
stepTic
stepCreateNotebookFranceCell
......@@ -2114,8 +2127,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateCurrencies
stepCreateProducts
stepCreateInvoiceTransactionRule
stepTic
stepUpdateInvoiceTransactionRuleMatrix
stepCreatePaymentRule
stepUpdatePaymentRuleMatrix
stepValidateInvoiceTransaction
stepTic
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