Commit 314e1832 authored by Sebastien Robin's avatar Sebastien Robin

make live tests and command line tests working in the same

way from login point of view

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44358 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dd5fc2fd
40933 40934
\ No newline at end of file \ No newline at end of file
...@@ -114,6 +114,7 @@ class ERP5TypeLiveTestCase(ERP5TypeTestCaseMixin): ...@@ -114,6 +114,7 @@ class ERP5TypeLiveTestCase(ERP5TypeTestCaseMixin):
''' '''
# Disabling portal_activities is required in order to avoid # Disabling portal_activities is required in order to avoid
# conflict with other threads doing tic in the same time # conflict with other threads doing tic in the same time
self.login()
self.initial_transaction_hash = transaction.get().__hash__() self.initial_transaction_hash = transaction.get().__hash__()
self.activity_tool_subscribed = self.getPortalObject()\ self.activity_tool_subscribed = self.getPortalObject()\
.portal_activities.isSubscribed() .portal_activities.isSubscribed()
......
...@@ -306,7 +306,14 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase): ...@@ -306,7 +306,14 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
""" """
Most of the time, we need to login before doing anything Most of the time, we need to login before doing anything
""" """
try:
PortalTestCase.login(self, user_name) PortalTestCase.login(self, user_name)
except AttributeError:
uf = self.getPortal().acl_users
uf._doAddUser('ERP5TypeTestCase', '', ['Manager', 'Member', 'Assignee',
'Assignor', 'Author', 'Auditor', 'Associate'], [])
return PortalTestCase.login(self, user_name)
def logout(self): def logout(self):
PortalTestCase.logout(self) PortalTestCase.logout(self)
......
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