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
eb748945
Commit
eb748945
authored
Jul 06, 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: in live test remove template reinstallation part.
parent
03398c3e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
30 deletions
+8
-30
bt5/erp5_workflow_test_data/TestTemplateItem/portal_components/test.erp5.testWorkflowAndDCWorkflow.py
.../portal_components/test.erp5.testWorkflowAndDCWorkflow.py
+8
-30
No files found.
bt5/erp5_workflow_test_data/TestTemplateItem/portal_components/test.erp5.testWorkflowAndDCWorkflow.py
View file @
eb748945
...
@@ -44,7 +44,7 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
...
@@ -44,7 +44,7 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
self
.
portal
.
portal_caches
.
clearAllCache
()
self
.
portal
.
portal_caches
.
clearAllCache
()
def
getStateFor
(
self
,
document
):
def
getStateFor
(
self
,
document
):
return
self
.
w
f
.
_getWorkflowStateOf
(
document
,
id_only
=
True
)
return
self
.
w
orkflow
.
_getWorkflowStateOf
(
document
,
id_only
=
True
)
def
resetComponentTool
(
self
):
def
resetComponentTool
(
self
):
# Force reset of portal_components to regenerate accessors
# Force reset of portal_components to regenerate accessors
...
@@ -196,31 +196,13 @@ class TestConvertedWorkflow(TestERP5WorkflowMixin):
...
@@ -196,31 +196,13 @@ class TestConvertedWorkflow(TestERP5WorkflowMixin):
"""
"""
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
self
.
portal
=
self
.
getPortal
()
self
.
portal
=
self
.
getPortal
()
# reinstall erp5_workflow_test_data template:
template_tool
=
self
.
portal
.
portal_templates
template_tool
.
installBusinessTemplateListFromRepository
([
'erp5_workflow_test_data'
])
workflow_module
=
self
.
portal
.
portal_workflow
workflow_module
=
self
.
portal
.
portal_workflow
dc_wf_id_list
=
[
'testing_workflow'
,
'testing_interaction_workflow'
]
# clean the workflow_list assignment
type_test_object
=
self
.
portal
.
portal_types
[
'ERP5Workflow Test Document'
]
type_test_object
=
self
.
portal
.
portal_types
[
'ERP5Workflow Test Document'
]
type_test_object
.
workflow_list
=
()
dc_workflow_id_list
=
[
'testing_workflow'
,
'testing_interaction_workflow'
]
ptype_id
=
'ERP5Workflow Test Document'
workflow_module
.
WorkflowTool_convertWorkflow
(
batch_mode
=
True
,
workflow_id_list
=
dc_workflow_id_list
)
type_test_object
=
self
.
portal
.
portal_types
.
_getOb
(
ptype_id
)
for
dc_wf_id
in
dc_wf_id_list
:
workflow_module
.
delTypeCBT
(
ptype_id
,
dc_wf_id
)
dc_wf
=
workflow_module
.
_getOb
(
dc_wf_id
)
if
dc_wf
.
getPortalType
()
not
in
[
'Workflow'
,
'Interaction Workflow'
]:
workflow_module
.
dc_workflow_asERP5Object
(
workflow_module
,
dc_wf
,
temp
=
0
)
#type_test_object.addTypeWorkflowList(workflow.id)
type_test_object
.
addTypeWorkflowList
(
'testing_interaction_workflow'
)
type_test_object
.
addTypeWorkflowList
(
'testing_workflow'
)
self
.
resetComponentTool
()
self
.
resetComponentTool
()
self
.
assertFalse
(
'testing_workflow'
in
self
.
getWorkflowTool
().
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
.
login
()
self
.
login
()
class
TestDCWorkflow
(
TestERP5WorkflowMixin
):
class
TestDCWorkflow
(
TestERP5WorkflowMixin
):
...
@@ -229,15 +211,11 @@ class TestDCWorkflow(TestERP5WorkflowMixin):
...
@@ -229,15 +211,11 @@ class TestDCWorkflow(TestERP5WorkflowMixin):
"""
"""
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
self
.
portal
=
self
.
getPortal
()
self
.
portal
=
self
.
getPortal
()
# reinstall erp5_workflow_test_data template:
template_tool
=
self
.
portal
.
portal_templates
template_tool
.
installBusinessTemplateListFromRepository
([
'erp5_workflow_test_data'
])
workflow_module
=
self
.
portal
.
portal_workflow
workflow_module
=
self
.
portal
.
portal_workflow
workflow_module
.
setChainForPortalTypes
([
'ERP5Workflow Test Document'
],
(
'testing_workflow'
,
'testing_interaction_workflow'
,
'edit_workflow'
,
))
workflow_module
.
setChainForPortalTypes
([
'ERP5Workflow Test Document'
],
(
'testing_workflow'
,
'testing_interaction_workflow'
,
'edit_workflow'
,
))
type_test_object
=
self
.
portal
.
portal_types
[
'ERP5Workflow Test Document'
]
type_test_object
=
self
.
portal
.
portal_types
[
'ERP5Workflow Test Document'
]
type_test_object
.
workflow_list
=
()
type_test_object
.
workflow_list
=
()
self
.
workflow
=
workflow_module
.
_getOb
(
'testing_workflow'
)
self
.
resetComponentTool
()
self
.
resetComponentTool
()
self
.
assertEqual
(
type_test_object
.
getTypeWorkflowList
(),
[])
self
.
assertEqual
(
type_test_object
.
getTypeWorkflowList
(),
[])
self
.
login
()
self
.
login
()
...
@@ -249,11 +227,11 @@ class TestDCWorkflow(TestERP5WorkflowMixin):
...
@@ -249,11 +227,11 @@ class TestDCWorkflow(TestERP5WorkflowMixin):
migrated workflow
migrated workflow
"""
"""
self
.
portal
=
self
.
getPortal
()
self
.
portal
=
self
.
getPortal
()
self
.
workflow_module
=
self
.
portal
.
portal_workflow
workflow_module
=
self
.
portal
.
portal_workflow
# Move to state "validated"
# Move to state "validated"
document
=
self
.
test_05_testCheckHistoryStateAndActionForASingleTransition
()
document
=
self
.
test_05_testCheckHistoryStateAndActionForASingleTransition
()
# Do conversion
# Do conversion
self
.
workflow_module
.
WorkflowTool_convertWorkflow
(
batch_mode
=
True
,
workflow_id_list
=
[
"testing_workflow"
])
workflow_module
.
WorkflowTool_convertWorkflow
(
batch_mode
=
True
,
workflow_id_list
=
[
"testing_workflow"
])
# Check we can invalidate
# Check we can invalidate
self
.
doActionFor
(
document
,
"invalidate_action"
)
self
.
doActionFor
(
document
,
"invalidate_action"
)
# check if history is ok and if we are in state "invalidated"
# check if history is ok and if we are in state "invalidated"
...
...
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