Commit 39761d39 authored by Jérome Perrin's avatar Jérome Perrin

don't inherit from AccountingTestCase, because setUp does too many things.

don't redefine useless login method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30845 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 221c9459
No related merge requests found
...@@ -2772,9 +2772,14 @@ class TestTransactions(AccountingTestCase): ...@@ -2772,9 +2772,14 @@ class TestTransactions(AccountingTestCase):
organisation1.getRelativeUrl())], organisation1.getRelativeUrl())],
self.portal.Account_getDestinationSectionItemList()) self.portal.Account_getDestinationSectionItemList())
class TestAccountingWithSequences(AccountingTestCase): class TestAccountingWithSequences(ERP5TypeTestCase):
"""The first test for Accounting """The first test for Accounting
""" """
def getBusinessTemplateList(self):
"""Returns list of BT to be installed."""
return ('erp5_base', 'erp5_pdm', 'erp5_trade', 'erp5_accounting', )
def getAccountingModule(self): def getAccountingModule(self):
return getattr(self.getPortal(), 'accounting_module', return getattr(self.getPortal(), 'accounting_module',
getattr(self.getPortal(), 'accounting', None)) getattr(self.getPortal(), 'accounting', None))
...@@ -2829,7 +2834,6 @@ class TestAccountingWithSequences(AccountingTestCase): ...@@ -2829,7 +2834,6 @@ class TestAccountingWithSequences(AccountingTestCase):
priority=Priority.USER ) priority=Priority.USER )
self.workflow_tool.doActionFor(self.pref, 'enable_action') self.workflow_tool.doActionFor(self.pref, 'enable_action')
self.login()
def beforeTearDown(self): def beforeTearDown(self):
"""Cleanup for next test. """Cleanup for next test.
...@@ -2853,14 +2857,6 @@ class TestAccountingWithSequences(AccountingTestCase): ...@@ -2853,14 +2857,6 @@ class TestAccountingWithSequences(AccountingTestCase):
transaction.commit() transaction.commit()
self.tic() self.tic()
def login(self) :
"""sets the security manager"""
uf = self.getPortal().acl_users
uf._doAddUser('alex', '', ['Member', 'Assignee', 'Assignor',
'Auditor', 'Author', 'Manager'], [])
user = uf.getUserById('alex').__of__(uf)
newSecurityManager(None, user)
def createCategories(self): def createCategories(self):
"""Create the categories for our test. """ """Create the categories for our test. """
# create categories # create categories
......
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