Commit b79a0de5 authored by Vincent Pelletier's avatar Vincent Pelletier

tests: Avoid duplicating test superuser id.

parent 8e27df66
...@@ -301,7 +301,7 @@ class TestERP5Credential(ERP5TypeTestCase): ...@@ -301,7 +301,7 @@ class TestERP5Credential(ERP5TypeTestCase):
self.tic() self.tic()
self.logout() self.logout()
self.portal.ERP5Site_activeLogin(mail_message.getReference()) self.portal.ERP5Site_activeLogin(mail_message.getReference())
self.login("ERP5TypeTestCase") self.login()
self.tic() self.tic()
person = portal_catalog.getResultValue(reference=reference, person = portal_catalog.getResultValue(reference=reference,
portal_type="Person") portal_type="Person")
...@@ -807,7 +807,7 @@ class TestERP5Credential(ERP5TypeTestCase): ...@@ -807,7 +807,7 @@ class TestERP5Credential(ERP5TypeTestCase):
default_address_city="Campos", default_address_city="Campos",
default_address_zip_code="28024030", default_address_zip_code="28024030",
**kw) **kw)
self.login("ERP5TypeTestCase") self.login()
self.tic() self.tic()
return result return result
...@@ -1108,7 +1108,7 @@ class TestERP5Credential(ERP5TypeTestCase): ...@@ -1108,7 +1108,7 @@ class TestERP5Credential(ERP5TypeTestCase):
default_follow_up_uid=credential_request.getUid()) default_follow_up_uid=credential_request.getUid())
self.logout() self.logout()
self.portal.ERP5Site_activeLogin(mail_message.getReference()) self.portal.ERP5Site_activeLogin(mail_message.getReference())
self.login("ERP5TypeTestCase") self.login()
self.tic() self.tic()
person = portal_catalog.getResultValue(reference="barney", person = portal_catalog.getResultValue(reference="barney",
portal_type="Person") portal_type="Person")
......
...@@ -57,7 +57,7 @@ class TestTemplate(ERP5TypeTestCase): ...@@ -57,7 +57,7 @@ class TestTemplate(ERP5TypeTestCase):
newSecurityManager(None, user) newSecurityManager(None, user)
def afterSetUp(self): def afterSetUp(self):
self.login('ERP5TypeTestCase') self.login()
portal_preferences = self.portal.portal_preferences portal_preferences = self.portal.portal_preferences
portal_preferences.deleteContent(list(portal_preferences.objectIds())) portal_preferences.deleteContent(list(portal_preferences.objectIds()))
self.tic() self.tic()
...@@ -240,7 +240,7 @@ class TestTemplate(ERP5TypeTestCase): ...@@ -240,7 +240,7 @@ class TestTemplate(ERP5TypeTestCase):
def test_TemplateCreatePreferenceWithSystemPreferenceEnabled(self): def test_TemplateCreatePreferenceWithSystemPreferenceEnabled(self):
# TODO: This test *might* be removed if it is good to trust # TODO: This test *might* be removed if it is good to trust
# getActivePreference to return only Preference portal type # getActivePreference to return only Preference portal type
self.login('ERP5TypeTestCase') self.login()
system_preference = self.portal.portal_preferences.newContent( system_preference = self.portal.portal_preferences.newContent(
portal_type='System Preference') portal_type='System Preference')
system_preference.setPriority(Priority.SITE) system_preference.setPriority(Priority.SITE)
......
...@@ -181,7 +181,7 @@ CREATE TABLE alternate_roles_and_users ( ...@@ -181,7 +181,7 @@ CREATE TABLE alternate_roles_and_users (
self.assertEqual([user2], self.assertEqual([user2],
[o.getObject() for o in self.portal.portal_catalog(portal_type='Person')]) [o.getObject() for o in self.portal.portal_catalog(portal_type='Person')])
self.login('ERP5TypeTestCase') self.login()
self.assertSameSet([user1, user2], self.assertSameSet([user1, user2],
[o.getObject() for o in [o.getObject() for o in
self.portal.portal_catalog(portal_type='Person')]) self.portal.portal_catalog(portal_type='Person')])
......
...@@ -392,7 +392,7 @@ class TestPreferences(PropertySheetTestCase): ...@@ -392,7 +392,7 @@ class TestPreferences(PropertySheetTestCase):
portal_workflow.doActionFor( portal_workflow.doActionFor(
user_b, 'enable_action', wf_id='preference_workflow') user_b, 'enable_action', wf_id='preference_workflow')
self.login('ERP5TypeTestCase') self.login()
script = createZODBPythonScript( script = createZODBPythonScript(
self.portal.portal_skins.custom, self.portal.portal_skins.custom,
'PreferenceTool_testPreferencesProxyRole', '', 'PreferenceTool_testPreferencesProxyRole', '',
......
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