Commit 44ee026b authored by Rafael Monnerat's avatar Rafael Monnerat

testSlapOSMixin: No need to declare getUserFolder

parent cfae019e
...@@ -55,7 +55,7 @@ class TestSlapOSSecurityMixin(SlapOSTestCaseMixin): ...@@ -55,7 +55,7 @@ class TestSlapOSSecurityMixin(SlapOSTestCaseMixin):
"""Checks that a user with login and password exists and can log in to the """Checks that a user with login and password exists and can log in to the
system. system.
""" """
uf = self.getUserFolder() uf = self.portal.acl_users
self.assertNotEqual(uf.getUserById(user_id, None), None) self.assertNotEqual(uf.getUserById(user_id, None), None)
for _, plugin in uf._getOb('plugins').listPlugins( for _, plugin in uf._getOb('plugins').listPlugins(
IAuthenticationPlugin ): IAuthenticationPlugin ):
...@@ -72,7 +72,7 @@ class TestSlapOSSecurityMixin(SlapOSTestCaseMixin): ...@@ -72,7 +72,7 @@ class TestSlapOSSecurityMixin(SlapOSTestCaseMixin):
"""Checks that a user with login and password does not exists and cannot """Checks that a user with login and password does not exists and cannot
log in to the system. log in to the system.
""" """
uf = self.getUserFolder() uf = self.portal.acl_users
for plugin_name, plugin in uf._getOb('plugins').listPlugins( for plugin_name, plugin in uf._getOb('plugins').listPlugins(
IAuthenticationPlugin ): IAuthenticationPlugin ):
if plugin.authenticateCredentials( if plugin.authenticateCredentials(
......
...@@ -147,12 +147,6 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -147,12 +147,6 @@ class testSlapOSMixin(ERP5TypeTestCase):
if self.abort_transaction: if self.abort_transaction:
transaction.abort() transaction.abort()
def getUserFolder(self):
"""
Return the user folder
"""
return getattr(self.getPortal(), 'acl_users', None)
def setUpOnce(self): def setUpOnce(self):
self.commit() self.commit()
self.portal.portal_templates.updateRepositoryBusinessTemplateList( self.portal.portal_templates.updateRepositoryBusinessTemplateList(
...@@ -162,7 +156,6 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -162,7 +156,6 @@ class testSlapOSMixin(ERP5TypeTestCase):
def updateInitSite(self): def updateInitSite(self):
self.portal.portal_caches.updateCache() self.portal.portal_caches.updateCache()
try: try:
initsite = config.product_config["initsite"] initsite = config.product_config["initsite"]
except KeyError: except KeyError:
......
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