Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
1b285dc8
Commit
1b285dc8
authored
Aug 23, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: change testWorklist to check new guards properties
parent
8778072e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testWorklist.py
...tTemplateItem/portal_components/test.erp5.testWorklist.py
+7
-9
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testWorklist.py
View file @
1b285dc8
...
@@ -492,24 +492,22 @@ class TestWorklist(testWorkflowMixin):
...
@@ -492,24 +492,22 @@ class TestWorklist(testWorkflowMixin):
worklist_value
=
getattr
(
workflow_value
,
'worklist_%s'
%
worklist_id
)
worklist_value
=
getattr
(
workflow_value
,
'worklist_%s'
%
worklist_id
)
# roles
# roles
worklist_value
.
setGuardRoleList
([])
worklist_value
.
setGuardRoleList
([])
self
.
assertEqual
(
[],
worklist_value
.
guard
.
roles
)
self
.
assertEqual
(
worklist_value
.
guard_role
,
()
)
worklist_value
.
setGuardRoleList
([
'Assignor'
,
'Assignee'
])
worklist_value
.
setGuardRoleList
([
'Assignor'
,
'Assignee'
])
self
.
assertEqual
(
[
'Assignor'
,
'Assignee'
],
worklist_value
.
guard
.
roles
)
self
.
assertEqual
(
worklist_value
.
guard_role
,
(
'Assignor'
,
'Assignee'
)
)
# permissions
# permissions
worklist_value
.
setGuardPermissionList
([])
worklist_value
.
setGuardPermissionList
([])
self
.
assertEqual
(
[],
worklist_value
.
guard
.
permissions
)
self
.
assertEqual
(
worklist_value
.
guard_permission
,
()
)
worklist_value
.
setGuardPermissionList
([
'Modify portal content'
])
worklist_value
.
setGuardPermissionList
([
'Modify portal content'
])
self
.
assertEqual
(
[
'Modify portal content'
],
worklist_value
.
guard
.
permissions
)
self
.
assertEqual
(
worklist_value
.
guard_permission
,
(
'Modify portal content'
,)
)
# groups
# groups
worklist_value
.
setGuardGroupList
([])
worklist_value
.
setGuardGroupList
([])
self
.
assertEqual
(
[],
worklist_value
.
guard
.
groups
)
self
.
assertEqual
(
worklist_value
.
guard_group
,
()
)
worklist_value
.
setGuardGroupList
([
'Group1'
,
'Group2'
])
worklist_value
.
setGuardGroupList
([
'Group1'
,
'Group2'
])
self
.
assertEqual
(
[
'Group1'
,
'Group2'
],
worklist_value
.
guard
.
groups
)
self
.
assertEqual
(
worklist_value
.
guard_group
,
(
'Group1'
,
'Group2'
)
)
# expression
# expression
worklist_value
.
setGuardExpression
(
''
)
self
.
assertEqual
(
None
,
worklist_value
.
guard
.
expr
)
worklist_value
.
setGuardExpression
(
'python: "Hello, world"'
)
worklist_value
.
setGuardExpression
(
'python: "Hello, world"'
)
self
.
assertEqual
(
worklist_value
.
guard
.
expr
.
text
,
'python: "Hello, world"'
)
self
.
assertEqual
(
worklist_value
.
guard
_expression
.
text
,
'python: "Hello, world"'
)
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
...
...
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