update script tests
This commit is contained in:
parent
b91a99867c
commit
3bfc53f974
|
@ -12,7 +12,7 @@
|
|||
<bpmn:scriptTask id="Activity_0pxf6g1" name="My Script" scriptFormat="python">
|
||||
<bpmn:extensionElements>
|
||||
<spiffworkflow:unitTests>
|
||||
<spiffworkflow:unitTest id="test1">
|
||||
<spiffworkflow:unitTest id="ScriptTest_pass">
|
||||
<spiffworkflow:inputJson>{
|
||||
"current_user": {
|
||||
"id": "2",
|
||||
|
@ -21,15 +21,16 @@
|
|||
}</spiffworkflow:inputJson>
|
||||
<spiffworkflow:expectedOutputJson>{
|
||||
"Mike": "Awesome",
|
||||
"i": 2,
|
||||
"current_user": {
|
||||
"id": "2",
|
||||
"username": "ciadmin1"
|
||||
},
|
||||
"my_var": "Hello World",
|
||||
"my_var": "whatwhat",
|
||||
"person": "Kevin"
|
||||
}</spiffworkflow:expectedOutputJson>
|
||||
</spiffworkflow:unitTest>
|
||||
<spiffworkflow:unitTest id="ScriptUnitTest_06ysv2z">
|
||||
<spiffworkflow:unitTest id="ScriptTest_fail">
|
||||
<spiffworkflow:inputJson>{}</spiffworkflow:inputJson>
|
||||
<spiffworkflow:expectedOutputJson>{}</spiffworkflow:expectedOutputJson>
|
||||
</spiffworkflow:unitTest>
|
||||
|
@ -37,7 +38,26 @@
|
|||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_10jwwqy</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0htxke7</bpmn:outgoing>
|
||||
<bpmn:script>my_var = "Hello World"
|
||||
<bpmn:script>for i in [0, 1, 2]:
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
print(f"{i}")
|
||||
|
||||
def fancy_function(sure):
|
||||
return sure + sure
|
||||
|
||||
|
||||
my_var = fancy_function('what')
|
||||
Mike = "Awesome"
|
||||
person = "Kevin"</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
|
|
Loading…
Reference in New Issue