Commit c677c64b authored by Jérome Perrin's avatar Jérome Perrin

simple test for Account_getDestinationSectionItemList script


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29923 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 509df5ea
...@@ -2751,7 +2751,26 @@ class TestTransactions(AccountingTestCase): ...@@ -2751,7 +2751,26 @@ class TestTransactions(AccountingTestCase):
self.assertEquals(500, accounting_transaction.AccountingTransaction_getTotalDebit()) self.assertEquals(500, accounting_transaction.AccountingTransaction_getTotalDebit())
self.assertEquals(400, accounting_transaction.AccountingTransaction_getTotalCredit()) self.assertEquals(400, accounting_transaction.AccountingTransaction_getTotalCredit())
def test_Account_getDestinationSectionItemList(self):
organisation1 = self.portal.organisation_module.newContent(
portal_type='Organisation',
title='Organisation 1')
organisation2 = self.portal.organisation_module.newContent(
portal_type='Organisation',
title='Organisation 2')
self._makeOne(
portal_type='Sale Invoice Transaction',
simulation_state='delivered',
destination_section_value=organisation1,
start_date=DateTime(2006, 2, 2),
lines=(dict(source_value=self.portal.account_module.receivable,
source_debit=100),
dict(source_value=self.portal.account_module.goods_sales,
source_credit=100.00)))
self.assertEquals([('', ''),
('Organisation 1 (Organisation)',
organisation1.getRelativeUrl())],
self.portal.Account_getDestinationSectionItemList())
class TestAccountingWithSequences(AccountingTestCase): class TestAccountingWithSequences(AccountingTestCase):
"""The first test for Accounting """The first test for Accounting
......
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