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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
19129849
Commit
19129849
authored
Mar 19, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_worklflow_test_data: really check available workflow actions.
parent
6f091944
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
bt5/erp5_workflow_test_data/TestTemplateItem/portal_components/test.erp5.testWorkflowAndDCWorkflow.py
.../portal_components/test.erp5.testWorkflowAndDCWorkflow.py
+13
-3
No files found.
bt5/erp5_workflow_test_data/TestTemplateItem/portal_components/test.erp5.testWorkflowAndDCWorkflow.py
View file @
19129849
...
...
@@ -95,10 +95,20 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
def
test_08_testUserActionDisplay
(
self
):
new_object
=
self
.
getTestObject
()
object_pt
=
new_object
.
getTypeInfo
()
self
.
assertTrue
(
hasattr
(
object_pt
,
'validate'
))
action_list
=
self
.
getWorkflowTool
().
listActions
(
object
=
new_object
)
self
.
assertEqual
(
1
,
len
(
action_list
))
action
=
action_list
[
0
]
def
checkExpectedDict
(
expected_dict
,
action
):
for
key
in
expected_dict
.
keys
():
self
.
assertEqual
(
expected_dict
[
key
],
action
.
get
(
key
))
checkExpectedDict
({
"category"
:
"workflow"
,
"name"
:
"Validate"
},
action
)
self
.
doActionFor
(
new_object
,
"validate"
)
self
.
assertTrue
(
hasattr
(
object_pt
,
'invalidate'
))
action_list
=
self
.
getWorkflowTool
().
listActions
(
object
=
new_object
)
self
.
assertEqual
(
1
,
len
(
action_list
))
action
=
action_list
[
0
]
checkExpectedDict
({
"category"
:
"workflow"
,
"name"
:
"Invalidate"
},
action
)
### Doesn't exist yet
def
_testSimpleWorklist
(
self
):
...
...
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