Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
358de89c
Commit
358de89c
authored
Apr 01, 2015
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Security: remove any changes made in the context of erp5 workflows
parent
8d306ef7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
product/ERP5Security/tests/testERP5Security.py
product/ERP5Security/tests/testERP5Security.py
+6
-10
No files found.
product/ERP5Security/tests/testERP5Security.py
View file @
358de89c
...
...
@@ -40,8 +40,6 @@ from Products.PluggableAuthService import PluggableAuthService
from
zope.interface.verify
import
verifyClass
from
DateTime
import
DateTime
import
pdb
class
TestUserManagement
(
ERP5TypeTestCase
):
"""Tests User Management in ERP5Security.
"""
...
...
@@ -52,7 +50,7 @@ class TestUserManagement(ERP5TypeTestCase):
def
getBusinessTemplateList
(
self
):
"""List of BT to install. """
return
(
'erp5_
workflow'
,
'erp5_
base'
,)
return
(
'erp5_base'
,)
def
beforeTearDown
(
self
):
"""Clears person module and invalidate caches when tests are finished."""
...
...
@@ -372,13 +370,10 @@ class TestUserManagement(ERP5TypeTestCase):
def
test_DeletedPersonIsNotUser
(
self
):
p
=
self
.
_makePerson
(
reference
=
'the_user'
,
password
=
'secret'
)
self
.
_assertUserExists
(
'the_user'
,
'secret'
)
if
not
p
.
getTypeInfo
().
getTypeERP5WorkflowList
():
p
.
delete
()
else
:
p
.
dlt
()
self
.
commit
()
### zwj: even the user has been delete, the information exist? why this test?
self
.
_assertUserDoesNotExists
(
'the_user'
,
'secret'
)
def
test_ReallyDeletedPersonIsNotUser
(
self
):
...
...
@@ -501,6 +496,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
# any member can add organisations
self
.
portal
.
organisation_module
.
manage_permission
(
'Add portal content'
,
roles
=
[
'Member'
,
'Manager'
],
acquire
=
1
)
self
.
username
=
'usérn@me'
# create a user and open an assignement
pers
=
self
.
getPersonModule
().
newContent
(
portal_type
=
'Person'
,
...
...
@@ -526,7 +522,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
ti
.
manage_delObjects
([
x
.
id
for
x
in
ti
.
getRoleInformationList
()])
# clear modules
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
()))
# commit this
self
.
tic
()
...
...
@@ -547,7 +543,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
def
getBusinessTemplateList
(
self
):
"""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
):
"""Tests group manager plugin respects interfaces."""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment