Commit 358de89c authored by Sebastien Robin's avatar Sebastien Robin

ERP5Security: remove any changes made in the context of erp5 workflows

parent 8d306ef7
...@@ -40,8 +40,6 @@ from Products.PluggableAuthService import PluggableAuthService ...@@ -40,8 +40,6 @@ from Products.PluggableAuthService import PluggableAuthService
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
from DateTime import DateTime from DateTime import DateTime
import pdb
class TestUserManagement(ERP5TypeTestCase): class TestUserManagement(ERP5TypeTestCase):
"""Tests User Management in ERP5Security. """Tests User Management in ERP5Security.
""" """
...@@ -52,7 +50,7 @@ class TestUserManagement(ERP5TypeTestCase): ...@@ -52,7 +50,7 @@ class TestUserManagement(ERP5TypeTestCase):
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
"""List of BT to install. """ """List of BT to install. """
return ('erp5_workflow', 'erp5_base',) return ('erp5_base',)
def beforeTearDown(self): def beforeTearDown(self):
"""Clears person module and invalidate caches when tests are finished.""" """Clears person module and invalidate caches when tests are finished."""
...@@ -372,13 +370,10 @@ class TestUserManagement(ERP5TypeTestCase): ...@@ -372,13 +370,10 @@ class TestUserManagement(ERP5TypeTestCase):
def test_DeletedPersonIsNotUser(self): def test_DeletedPersonIsNotUser(self):
p = self._makePerson(reference='the_user', password='secret') p = self._makePerson(reference='the_user', password='secret')
self._assertUserExists('the_user', 'secret') self._assertUserExists('the_user', 'secret')
if not p.getTypeInfo().getTypeERP5WorkflowList():
p.delete() p.delete()
else:
p.dlt()
self.commit() self.commit()
### zwj: even the user has been delete, the information exist? why this test?
self._assertUserDoesNotExists('the_user', 'secret') self._assertUserDoesNotExists('the_user', 'secret')
def test_ReallyDeletedPersonIsNotUser(self): def test_ReallyDeletedPersonIsNotUser(self):
...@@ -501,6 +496,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -501,6 +496,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
# any member can add organisations # any member can add organisations
self.portal.organisation_module.manage_permission( self.portal.organisation_module.manage_permission(
'Add portal content', roles=['Member', 'Manager'], acquire=1) 'Add portal content', roles=['Member', 'Manager'], acquire=1)
self.username = 'usérn@me' self.username = 'usérn@me'
# create a user and open an assignement # create a user and open an assignement
pers = self.getPersonModule().newContent(portal_type='Person', pers = self.getPersonModule().newContent(portal_type='Person',
...@@ -526,7 +522,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -526,7 +522,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
ti.manage_delObjects([x.id for x in ti.getRoleInformationList()]) ti.manage_delObjects([x.id for x in ti.getRoleInformationList()])
# clear modules # clear modules
for module in self.portal.objectValues(): for module in self.portal.objectValues():
if module.getId().endswith('_module') and module.getId() != 'workflow_module': if module.getId().endswith('_module'):
module.manage_delObjects(list(module.objectIds())) module.manage_delObjects(list(module.objectIds()))
# commit this # commit this
self.tic() self.tic()
...@@ -547,7 +543,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -547,7 +543,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
"""List of BT to install. """ """List of BT to install. """
return ('erp5_workflow', 'erp5_base', 'erp5_web', 'erp5_ingestion', 'erp5_dms',) return ('erp5_base', 'erp5_web', 'erp5_ingestion', 'erp5_dms',)
def test_RolesManagerInterfaces(self): def test_RolesManagerInterfaces(self):
"""Tests group manager plugin respects interfaces.""" """Tests group manager plugin respects interfaces."""
......
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