[Erp5-report] r29923 - /erp5/trunk/products/ERP5/tests/testAccounting.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Oct 22 14:04:03 CEST 2009


Author: jerome
Date: Thu Oct 22 14:04:02 2009
New Revision: 29923

URL: http://svn.erp5.org?rev=29923&view=rev
Log:
simple test for Account_getDestinationSectionItemList script

Modified:
    erp5/trunk/products/ERP5/tests/testAccounting.py

Modified: erp5/trunk/products/ERP5/tests/testAccounting.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testAccounting.py?rev=29923&r1=29922&r2=29923&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccounting.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testAccounting.py [utf8] Thu Oct 22 14:04:02 2009
@@ -2751,7 +2751,26 @@
     self.assertEquals(500, accounting_transaction.AccountingTransaction_getTotalDebit())
     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):
   """The first test for Accounting




More information about the Erp5-report mailing list