Commit 0bf91051 authored by Jérome Perrin's avatar Jérome Perrin

reorganise tests: move test_isCreditAccount method in TestAccounts class


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19783 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 159b352c
......@@ -247,6 +247,17 @@ class TestAccounts(AccountingTestCase):
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 @@ class TestAccounting(ERP5TypeTestCase):
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.
......
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