[Erp5-report] r19783 - /erp5/trunk/products/ERP5/tests/testAccounting.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 11 10:31:01 CET 2008
Author: jerome
Date: Tue Mar 11 10:31:00 2008
New Revision: 19783
URL: http://svn.erp5.org?rev=19783&view=rev
Log:
reorganise tests: move test_isCreditAccount method in TestAccounts class
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=19783&r1=19782&r2=19783&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccounting.py (original)
+++ erp5/trunk/products/ERP5/tests/testAccounting.py Tue Mar 11 10:31:00 2008
@@ -247,6 +247,17 @@
doActionFor(account, 'validate_action')
self.assertEquals('validated', account.getValidationState())
+ def test_isCreditAccount(self):
+ """Tests the 'credit_account' property on account, which was named
+ is_credit_account, which generated isIsCreditAccount accessor"""
+ account = self.portal.account_module.newContent(portal_type='Account')
+ # simulate an old object
+ account.is_credit_account = True
+ self.failUnless(account.isCreditAccount())
+ self.failUnless(account.getProperty('credit_account'))
+
+ account.setCreditAccount(False)
+ self.failIf(account.isCreditAccount())
class TestTransactionValidation(AccountingTestCase):
@@ -2821,18 +2832,6 @@
self.assertRaises(ValidationFailed, self.getWorkflowTool().doActionFor,
transaction, 'stop_action')
- def test_Account_isCreditAccount(self):
- """Tests the 'credit_account' property on account, which was named
- is_credit_account, which generated isIsCreditAccount accessor"""
- account = self.getAccountModule().newContent(portal_type='Account')
- # simulate an old object
- account.is_credit_account = True
- self.failUnless(account.isCreditAccount())
- self.failUnless(account.getProperty('credit_account'))
-
- account.setCreditAccount(False)
- self.failIf(account.isCreditAccount())
-
# tests for Invoice_createRelatedPaymentTransaction
def _checkRelatedSalePayment(self, invoice, payment, payment_node, quantity):
"""Check payment of a Sale Invoice.
More information about the Erp5-report
mailing list