@@ -53,7 +53,7 @@ def test_get_workflow():
53
53
wf , _ = utaa .get_workflow (workflow_id = wfid )
54
54
55
55
# Assert
56
- assert wf ["workflow" ][ " name" ] == "blah"
56
+ assert wf ["name" ] == "blah"
57
57
58
58
59
59
def test_create_running_workflow ():
@@ -90,10 +90,9 @@ def test_get_running_workflow():
90
90
response , _ = utaa .get_running_workflow (running_workflow_id = rwfid )
91
91
92
92
# Assert
93
- rwf = response ["running_workflow" ]
94
- assert not rwf ["done" ]
95
- assert rwf ["workflow" ] == wfid
96
- assert rwf ["variables" ] == {"x" : 1 }
93
+ assert not response ["done" ]
94
+ assert response ["workflow" ]["id" ] == wfid
95
+ assert response ["variables" ] == {"x" : 1 }
97
96
98
97
99
98
def test_set_running_workflow_done_when_success ():
@@ -113,10 +112,10 @@ def test_set_running_workflow_done_when_success():
113
112
114
113
# Assert
115
114
response , _ = utaa .get_running_workflow (running_workflow_id = rwfid )
116
- assert response ["running_workflow" ][ " done" ]
117
- assert response ["running_workflow" ][ " success" ]
118
- assert response ["running_workflow" ][ " error" ] is None
119
- assert response ["running_workflow" ][ " error_msg" ] is None
115
+ assert response ["done" ]
116
+ assert response ["success" ]
117
+ assert response ["error" ] is None
118
+ assert response ["error_msg" ] is None
120
119
121
120
122
121
def test_set_running_workflow_done_when_failed ():
@@ -138,10 +137,10 @@ def test_set_running_workflow_done_when_failed():
138
137
139
138
# Assert
140
139
response , _ = utaa .get_running_workflow (running_workflow_id = rwfid )
141
- assert response ["running_workflow" ][ " done" ]
142
- assert not response ["running_workflow" ][ " success" ]
143
- assert response ["running_workflow" ][ " error" ] == 1
144
- assert response ["running_workflow" ][ " error_msg" ] == "Bang!"
140
+ assert response ["done" ]
141
+ assert not response ["success" ]
142
+ assert response ["error" ] == 1
143
+ assert response ["error_msg" ] == "Bang!"
145
144
146
145
147
146
def test_create_running_workflow_step ():
@@ -184,10 +183,10 @@ def test_set_running_workflow_step_done_when_success():
184
183
185
184
# Assert
186
185
response , _ = utaa .get_running_workflow_step (running_workflow_step_id = rwfsid )
187
- assert response ["running_workflow_step" ][ " done" ]
188
- assert response ["running_workflow_step" ][ " success" ]
189
- assert response ["running_workflow_step" ][ " error" ] is None
190
- assert response ["running_workflow_step" ][ " error_msg" ] is None
186
+ assert response ["done" ]
187
+ assert response ["success" ]
188
+ assert response ["error" ] is None
189
+ assert response ["error_msg" ] is None
191
190
192
191
193
192
def test_set_running_workflow_step_done_when_failed ():
@@ -212,10 +211,10 @@ def test_set_running_workflow_step_done_when_failed():
212
211
213
212
# Assert
214
213
response , _ = utaa .get_running_workflow_step (running_workflow_step_id = rwfsid )
215
- assert response ["running_workflow_step" ][ " done" ]
216
- assert not response ["running_workflow_step" ][ " success" ]
217
- assert response ["running_workflow_step" ][ " error" ] == 1
218
- assert response ["running_workflow_step" ][ " error_msg" ] == "Bang!"
214
+ assert response ["done" ]
215
+ assert not response ["success" ]
216
+ assert response ["error" ] == 1
217
+ assert response ["error_msg" ] == "Bang!"
219
218
220
219
221
220
def test_get_running_workflow_step ():
@@ -239,10 +238,9 @@ def test_get_running_workflow_step():
239
238
response , _ = utaa .get_running_workflow_step (running_workflow_step_id = rwfsid )
240
239
241
240
# Assert
242
- rwfs = response ["running_workflow_step" ]
243
- assert rwfs ["step" ] == "step-1"
244
- assert not rwfs ["done" ]
245
- assert rwfs ["running_workflow" ] == rwfid
241
+ assert response ["step" ] == "step-1"
242
+ assert not response ["done" ]
243
+ assert response ["running_workflow" ] == rwfid
246
244
247
245
248
246
def test_create_instance ():
0 commit comments