@@ -324,20 +324,9 @@ def test_get_running_workflow_step_with_prior_step():
324
324
def test_create_instance ():
325
325
# Arrange
326
326
utaa = UnitTestWorkflowAPIAdapter ()
327
- response = utaa .create_workflow (workflow_definition = {"name" : "blah" })
328
- response = utaa .create_running_workflow (
329
- user_id = "dlister" ,
330
- workflow_id = response ["id" ],
331
- project_id = TEST_PROJECT_ID ,
332
- variables = {},
333
- )
334
- response , _ = utaa .create_running_workflow_step (
335
- running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
336
- )
337
- rwfs_id = response ["id" ]
338
327
339
328
# Act
340
- response = utaa .create_instance (running_workflow_step_id = rwfs_id )
329
+ response = utaa .create_instance ()
341
330
342
331
# Assert
343
332
assert "id" in response
@@ -346,79 +335,14 @@ def test_create_instance():
346
335
def test_create_and_get_instance ():
347
336
# Arrange
348
337
utaa = UnitTestWorkflowAPIAdapter ()
349
- response = utaa .create_workflow (workflow_definition = {"name" : "blah" })
350
- response = utaa .create_running_workflow (
351
- user_id = "dlister" ,
352
- workflow_id = response ["id" ],
353
- project_id = TEST_PROJECT_ID ,
354
- variables = {},
355
- )
356
- response , _ = utaa .create_running_workflow_step (
357
- running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
358
- )
359
- rwfs_id = response ["id" ]
360
- response = utaa .create_instance (running_workflow_step_id = rwfs_id )
338
+ response = utaa .create_instance ()
361
339
instance_id = response ["id" ]
362
340
363
341
# Act
364
342
response , _ = utaa .get_instance (instance_id = instance_id )
365
343
366
344
# Assert
367
- assert response ["running_workflow_step_id" ] == rwfs_id
368
-
369
-
370
- def test_create_instance_and_get_step_instance_directory ():
371
- # Arrange
372
- utaa = UnitTestWorkflowAPIAdapter ()
373
- response = utaa .create_workflow (workflow_definition = {"name" : "blah" })
374
- response = utaa .create_running_workflow (
375
- user_id = "dlister" ,
376
- workflow_id = response ["id" ],
377
- project_id = TEST_PROJECT_ID ,
378
- variables = {},
379
- )
380
- response , _ = utaa .create_running_workflow_step (
381
- running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
382
- )
383
- rwfs_id = response ["id" ]
384
- response = utaa .create_instance (running_workflow_step_id = rwfs_id )
385
- i_id = response ["id" ]
386
-
387
- # Act
388
- response , _ = utaa .get_running_workflow_step (running_workflow_step_id = rwfs_id )
389
-
390
- # Assert
391
- assert "instance_directory" in response
392
- assert response ["instance_directory" ] == f".{ i_id } "
393
-
394
-
395
- def test_create_instance_and_get_step_instance_directory_by_name ():
396
- # Arrange
397
- utaa = UnitTestWorkflowAPIAdapter ()
398
- response = utaa .create_workflow (workflow_definition = {"name" : "blah" })
399
- wf_id = response ["id" ]
400
- response = utaa .create_running_workflow (
401
- user_id = "dlister" ,
402
- workflow_id = wf_id ,
403
- project_id = TEST_PROJECT_ID ,
404
- variables = {},
405
- )
406
- rwf_id = response ["id" ]
407
- response , _ = utaa .create_running_workflow_step (
408
- running_workflow_id = rwf_id , step = "step-1" , instance_id = _I_ID
409
- )
410
- rwfs_id = response ["id" ]
411
- response = utaa .create_instance (running_workflow_step_id = rwfs_id )
412
- i_id = response ["id" ]
413
-
414
- # Act
415
- response , _ = utaa .get_running_workflow_step_by_name (
416
- running_workflow_id = rwf_id , name = "step-1"
417
- )
418
-
419
- # Assert
420
- assert "instance_directory" in response
421
- assert response ["instance_directory" ] == f".{ i_id } "
345
+ assert response ["running_workflow_step_id" ] == ""
422
346
423
347
424
348
def test_get_running_workflow_step_by_name ():
0 commit comments