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
Levin Zimmermann
erp5
Commits
a4c2c46b
Commit
a4c2c46b
authored
Jul 10, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_workflow_test_data: activate worklist test.
parent
4893ed2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
bt5/erp5_workflow_test_data/TestTemplateItem/portal_components/test.erp5.testWorkflowAndDCWorkflow.py
.../portal_components/test.erp5.testWorkflowAndDCWorkflow.py
+5
-9
No files found.
bt5/erp5_workflow_test_data/TestTemplateItem/portal_components/test.erp5.testWorkflowAndDCWorkflow.py
View file @
a4c2c46b
...
@@ -21,7 +21,6 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
...
@@ -21,7 +21,6 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
def
checkWorklist
(
self
,
result
,
name
,
count
,
url_parameter_dict
=
None
):
def
checkWorklist
(
self
,
result
,
name
,
count
,
url_parameter_dict
=
None
):
entry_list
=
[
x
for
x
in
result
if
x
[
'name'
].
startswith
(
name
)]
entry_list
=
[
x
for
x
in
result
if
x
[
'name'
].
startswith
(
name
)]
#raise NotImplementedError (result)
self
.
assertEqual
(
len
(
entry_list
),
count
and
1
)
self
.
assertEqual
(
len
(
entry_list
),
count
and
1
)
if
count
:
if
count
:
self
.
assertEqual
(
count
,
self
.
assertEqual
(
count
,
...
@@ -153,21 +152,17 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
...
@@ -153,21 +152,17 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
checkLine
({
'state'
:
'draft'
},
1
)
checkLine
({
'state'
:
'draft'
},
1
)
checkLine
({
'state'
:
'validated'
},
2
)
checkLine
({
'state'
:
'validated'
},
2
)
"""
def
test_10_testSimpleWorklist
(
self
):
def
test_10_testSimpleWorklist
(
self
):
#check the counter from worklist action_name.
# check the counter from worklist action_name.
# need another way to check, because worklist update every 5 mins
self
.
login
(
"workflow_development"
)
self
.
login
(
"workflow_development"
)
self
.
portal
=
self
.
getPortal
()
self
.
portal
=
self
.
getPortal
()
new_object
=
self
.
getTestObject
()
new_object
=
self
.
getTestObject
()
workflow_tool
=
self
.
portal
.
portal_workflow
workflow_tool
=
self
.
portal
.
portal_workflow
self.clearCache()
self
.
tic
()
# reindexing for security
new_object.reindexObject()
self
.
clearCache
()
self
.
clearCache
()
result
=
workflow_tool
.
listActions
(
object
=
new_object
)
result
=
workflow_tool
.
listActions
(
object
=
new_object
)
self
.
checkWorklist
(
result
,
'Document'
,
1
)
self
.
checkWorklist
(
result
,
'Document'
,
1
)
"""
def
test_11_testValidationInteraction
(
self
):
def
test_11_testValidationInteraction
(
self
):
"""
"""
...
@@ -187,6 +182,7 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
...
@@ -187,6 +182,7 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
workflow_tool
=
self
.
portal
.
portal_workflow
workflow_tool
=
self
.
portal
.
portal_workflow
self
.
assertEqual
(
workflow_tool
.
isTransitionPossible
(
new_object
,
'invalidate'
),
0
)
self
.
assertEqual
(
workflow_tool
.
isTransitionPossible
(
new_object
,
'invalidate'
),
0
)
self
.
doActionFor
(
new_object
,
"validate_action"
)
self
.
doActionFor
(
new_object
,
"validate_action"
)
self
.
clearCache
()
self
.
assertEqual
(
self
.
getStateFor
(
new_object
),
'validated'
)
self
.
assertEqual
(
self
.
getStateFor
(
new_object
),
'validated'
)
self
.
assertEqual
(
workflow_tool
.
isTransitionPossible
(
new_object
,
'invalidate'
),
1
)
self
.
assertEqual
(
workflow_tool
.
isTransitionPossible
(
new_object
,
'invalidate'
),
1
)
...
@@ -199,7 +195,7 @@ class TestConvertedWorkflow(TestERP5WorkflowMixin):
...
@@ -199,7 +195,7 @@ class TestConvertedWorkflow(TestERP5WorkflowMixin):
workflow_module
=
self
.
portal
.
portal_workflow
workflow_module
=
self
.
portal
.
portal_workflow
type_test_object
=
self
.
portal
.
portal_types
[
'ERP5Workflow Test Document'
]
type_test_object
=
self
.
portal
.
portal_types
[
'ERP5Workflow Test Document'
]
dc_workflow_id_list
=
[
'testing_workflow'
,
'testing_interaction_workflow'
]
dc_workflow_id_list
=
[
'testing_workflow'
,
'testing_interaction_workflow'
]
workflow_module
.
WorkflowTool_convertWorkflow
(
batch_mode
=
True
,
workflow_id_list
=
dc_workflow_id_list
)
workflow_module
.
WorkflowTool_convertWorkflow
(
batch_mode
=
True
,
workflow_id_list
=
dc_workflow_id_list
)
self
.
resetComponentTool
()
self
.
resetComponentTool
()
self
.
assertFalse
(
'testing_workflow'
in
workflow_module
.
getChainFor
(
type_test_object
.
getId
()))
self
.
assertFalse
(
'testing_workflow'
in
workflow_module
.
getChainFor
(
type_test_object
.
getId
()))
self
.
workflow
=
workflow_module
.
_getOb
(
'testing_workflow'
)
self
.
workflow
=
workflow_module
.
_getOb
(
'testing_workflow'
)
...
...
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