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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5
Commits
133118fc
Commit
133118fc
authored
Dec 07, 2022
by
Eteri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core_test: extend test to cover Workflow Transition Variable
parent
fcae4da8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Workflow.py
...plateItem/portal_components/test.erp5.testERP5Workflow.py
+16
-0
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Workflow.py
View file @
133118fc
...
...
@@ -132,6 +132,22 @@ class TestERP5Workflow(ERP5TypeTestCase):
history
=
doc
.
workflow_history
[
'wf'
]
self
.
assertEqual
(
len
(
history
),
2
)
# create, transition1
transition_variable
=
transition1
.
newContent
(
portal_type
=
'Workflow Transition Variable'
,
causality_value
=
variable1
,
variable_default_expression
=
'string:Set by transition variable'
,
)
workflow
.
_executeTransition
(
doc
,
transition1
)
self
.
assertEqual
(
workflow
.
getCurrentStatusDict
(
doc
)[
'variable1'
],
"Set by transition variable"
)
# Without an expression, the variable is set to None
transition_variable
.
setVariableDefaultExpression
(
None
)
workflow
.
_executeTransition
(
doc
,
transition1
)
self
.
assertEqual
(
workflow
.
getCurrentStatusDict
(
doc
)[
'variable1'
],
None
)
def
test_afterScript
(
self
):
workflow
=
self
.
workflow_module
.
newContent
(
...
...
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