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
Alexander Emmerich
erp5
Commits
c991eaa3
Commit
c991eaa3
authored
Jun 11, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testERP5Workflow.py: remove ERP5 prefix.
parent
6fd9a7de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
product/ERP5Workflow/tests/testERP5Workflow.py
product/ERP5Workflow/tests/testERP5Workflow.py
+5
-5
No files found.
product/ERP5Workflow/tests/testERP5Workflow.py
View file @
c991eaa3
...
@@ -76,7 +76,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
...
@@ -76,7 +76,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
# set initial state
# set initial state
workflow
.
setSourceValue
(
s1
)
workflow
.
setSourceValue
(
s1
)
# create a document and associate it to this workflow
# create a document and associate it to this workflow
self
.
getPortalObject
().
portal_types
.
_getOb
(
'Folder'
).
edit
(
type_
erp5
workflow_list
=
(
'workflow_wf'
))
self
.
getPortalObject
().
portal_types
.
_getOb
(
'Folder'
).
edit
(
type_workflow_list
=
(
'workflow_wf'
))
doc
=
self
.
portal
.
newContent
(
portal_type
=
'Folder'
,
id
=
'test_doc'
)
doc
=
self
.
portal
.
newContent
(
portal_type
=
'Folder'
,
id
=
'test_doc'
)
self
.
assertEqual
(
's1'
,
workflow
.
_getWorkflowStateOf
(
doc
,
id_only
=
1
))
self
.
assertEqual
(
's1'
,
workflow
.
_getWorkflowStateOf
(
doc
,
id_only
=
1
))
...
@@ -103,7 +103,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
...
@@ -103,7 +103,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
t2
.
setReference
(
't2'
)
t2
.
setReference
(
't2'
)
s1
.
setDestinationValueList
([
t1
,
t2
])
s1
.
setDestinationValueList
([
t1
,
t2
])
self
.
getPortalObject
().
portal_types
.
_getOb
(
'Folder'
).
edit
(
type_
erp5
workflow_list
=
(
'workflow_wf'
))
self
.
getPortalObject
().
portal_types
.
_getOb
(
'Folder'
).
edit
(
type_workflow_list
=
(
'workflow_wf'
))
doc
=
self
.
portal
.
newContent
(
portal_type
=
'Folder'
,
id
=
'test_doc'
)
doc
=
self
.
portal
.
newContent
(
portal_type
=
'Folder'
,
id
=
'test_doc'
)
self
.
assertEqual
([
t1
,
t2
],
s1
.
getDestinationValueList
())
self
.
assertEqual
([
t1
,
t2
],
s1
.
getDestinationValueList
())
...
@@ -127,7 +127,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
...
@@ -127,7 +127,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
title
=
'actor'
)
title
=
'actor'
)
v1
.
setReference
(
'actor'
)
v1
.
setReference
(
'actor'
)
v1
.
default_expr
=
'user/getUserName'
v1
.
default_expr
=
'user/getUserName'
self
.
getPortalObject
().
portal_types
.
_getOb
(
'Folder'
).
edit
(
type_
erp5
workflow_list
=
(
'workflow_wf'
))
self
.
getPortalObject
().
portal_types
.
_getOb
(
'Folder'
).
edit
(
type_workflow_list
=
(
'workflow_wf'
))
doc
=
self
.
portal
.
newContent
(
portal_type
=
'Folder'
,
id
=
'test_doc'
)
doc
=
self
.
portal
.
newContent
(
portal_type
=
'Folder'
,
id
=
'test_doc'
)
workflow
.
_executeTransition
(
doc
,
t1
)
workflow
.
_executeTransition
(
doc
,
t1
)
current_state
=
workflow
.
getCurrentStatusDict
(
doc
)
current_state
=
workflow
.
getCurrentStatusDict
(
doc
)
...
@@ -163,7 +163,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
...
@@ -163,7 +163,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
script
.
setParameterSignature
(
"state_change"
)
script
.
setParameterSignature
(
"state_change"
)
script
.
setParameterSignature
(
"state_change"
)
script
.
setParameterSignature
(
"state_change"
)
script
.
setBody
(
"state_change['object'].setDescription('After script was executed.')"
)
script
.
setBody
(
"state_change['object'].setDescription('After script was executed.')"
)
self
.
getPortalObject
().
portal_types
.
_getOb
(
'Folder'
).
edit
(
type_
erp5
workflow_list
=
(
'workflow_wf'
))
self
.
getPortalObject
().
portal_types
.
_getOb
(
'Folder'
).
edit
(
type_workflow_list
=
(
'workflow_wf'
))
doc
=
self
.
portal
.
newContent
(
portal_type
=
'Folder'
,
id
=
'test_doc'
)
doc
=
self
.
portal
.
newContent
(
portal_type
=
'Folder'
,
id
=
'test_doc'
)
workflow
.
_executeTransition
(
doc
,
t1
)
workflow
.
_executeTransition
(
doc
,
t1
)
...
@@ -194,7 +194,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
...
@@ -194,7 +194,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
script
.
setParameterSignature
(
"state_change"
)
script
.
setParameterSignature
(
"state_change"
)
script
.
setBody
(
"state_change['object'].setDescription('Before script was executed.')"
)
script
.
setBody
(
"state_change['object'].setDescription('Before script was executed.')"
)
self
.
getPortalObject
().
portal_types
.
_getOb
(
'Folder'
).
edit
(
type_
erp5
workflow_list
=
(
'workflow_wf'
))
self
.
getPortalObject
().
portal_types
.
_getOb
(
'Folder'
).
edit
(
type_workflow_list
=
(
'workflow_wf'
))
doc
=
self
.
portal
.
newContent
(
portal_type
=
'Folder'
,
id
=
'test_doc'
)
doc
=
self
.
portal
.
newContent
(
portal_type
=
'Folder'
,
id
=
'test_doc'
)
workflow
.
_executeTransition
(
doc
,
t1
)
workflow
.
_executeTransition
(
doc
,
t1
)
...
...
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