Commit 92f5910e authored by Jérome Perrin's avatar Jérome Perrin

do not override login with different behaviour


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33915 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7d113cb0
...@@ -153,15 +153,13 @@ class AccountingTestCase(ERP5TypeTestCase): ...@@ -153,15 +153,13 @@ class AccountingTestCase(ERP5TypeTestCase):
tr.deliver() tr.deliver()
return tr return tr
def createUserAndlogin(self, name=username):
def login(self, name=username):
"""login with Assignee, Assignor & Author roles.""" """login with Assignee, Assignor & Author roles."""
uf = self.getPortal().acl_users uf = self.getPortal().acl_users
uf._doAddUser(self.username, '', ['Assignee', 'Assignor', 'Author'], []) uf._doAddUser(self.username, '', ['Assignee', 'Assignor', 'Author'], [])
user = uf.getUserById(self.username).__of__(uf) user = uf.getUserById(self.username).__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def setUp(self): def setUp(self):
"""Setup the fixture. """Setup the fixture.
""" """
...@@ -4032,7 +4030,7 @@ class TestAccountingTransactionTemplate(AccountingTestCase): ...@@ -4032,7 +4030,7 @@ class TestAccountingTransactionTemplate(AccountingTestCase):
def test_Template(self): def test_Template(self):
self.disableUserPreferenceList() self.disableUserPreferenceList()
self.login('claudie') self.createUserAndlogin('claudie')
preference = self.portal.portal_preferences.newContent('Preference') preference = self.portal.portal_preferences.newContent('Preference')
preference.priority = Priority.USER preference.priority = Priority.USER
preference.enable() preference.enable()
...@@ -4077,7 +4075,7 @@ class TestAccountingTransactionTemplate(AccountingTestCase): ...@@ -4077,7 +4075,7 @@ class TestAccountingTransactionTemplate(AccountingTestCase):
# test creating a template using Base_doAction script (this is what # test creating a template using Base_doAction script (this is what
# erp5_xhtml_style does) # erp5_xhtml_style does)
self.disableUserPreferenceList() self.disableUserPreferenceList()
self.login('claudie') self.createUserAndlogin('claudie')
preference = self.portal.portal_preferences.newContent('Preference') preference = self.portal.portal_preferences.newContent('Preference')
preference.priority = Priority.USER preference.priority = Priority.USER
preference.enable() preference.enable()
......
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