@@ -394,6 +394,16 @@ def test_complete_artifact_transformation(self):
394
394
# Implicitly tested by "test_complete"
395
395
pass
396
396
397
+ def test_complete_no_artifact_data (self ):
398
+ job = qdb .processing_job .ProcessingJob .create (
399
+ qdb .user .User ('test@foo.bar' ),
400
+ qdb .software .Parameters .load (
401
+ qdb .software .Command (5 ),
402
+ values_dict = {"input_data" : 1 }))
403
+ job ._set_status ('running' )
404
+ job .complete (True )
405
+ self .assertEqual (job .status , 'success' )
406
+
397
407
def test_complete_type (self ):
398
408
fd , fp = mkstemp (suffix = "_table.biom" )
399
409
self ._clean_up_files .append (fp )
@@ -448,7 +458,13 @@ def test_complete_success(self):
448
458
alljobs = set (self ._get_all_job_ids ())
449
459
450
460
job .complete (True , artifacts_data = artifacts_data )
451
- self .assertTrue (job .status , 'success' )
461
+ # When completing the previous job, it creates a new job that needs
462
+ # to validate the BIOM table that is being added as new artifact.
463
+ # Hence, this job is still in running state until the validation job
464
+ # is completed. Note that this is tested by making sure that the status
465
+ # of this job is running, and that we have one more job than before
466
+ # (see assertEqual with len of all jobs)
467
+ self .assertEqual (job .status , 'running' )
452
468
453
469
obsjobs = set (self ._get_all_job_ids ())
454
470
0 commit comments