File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,9 @@ def delete(cls, id_):
440
440
sql = "DELETE FROM qiita.investigation_study WHERE study_id = %s"
441
441
qdb .sql_connection .TRN .add (sql , args )
442
442
443
+ sql = "DELETE FROM qiita.per_study_tags WHERE study_id = %s"
444
+ qdb .sql_connection .TRN .add (sql , args )
445
+
443
446
sql = "DELETE FROM qiita.study WHERE study_id = %s"
444
447
qdb .sql_connection .TRN .add (sql , args )
445
448
Original file line number Diff line number Diff line change 34
34
35
35
class BaseTestPrivatePlugin (TestCase ):
36
36
def _create_job (self , cmd_name , values_dict ):
37
- user = User ('test@foo.bar' )
37
+ self . user = User ('test@foo.bar' )
38
38
qiita_plugin = Software .from_name_and_version ('Qiita' , 'alpha' )
39
39
cmd = qiita_plugin .get_command (cmd_name )
40
40
params = Parameters .load (cmd , values_dict = values_dict )
41
- job = ProcessingJob .create (user , params )
41
+ job = ProcessingJob .create (self . user , params )
42
42
job ._set_status ('queued' )
43
43
return job
44
44
@@ -389,13 +389,17 @@ def test_delete_study(self):
389
389
"submitted to EBI" , job .log .msg )
390
390
391
391
# delete everything from the EBI submissions and the processing job so
392
- # we can try again: test success
392
+ # we can try again: test success (with tags)
393
393
with TRN :
394
394
sql = """DELETE FROM qiita.ebi_run_accession"""
395
395
TRN .add (sql )
396
396
sql = """DELETE FROM qiita.artifact_processing_job"""
397
397
TRN .add (sql )
398
398
TRN .execute ()
399
+
400
+ # adding tags
401
+ Study (1 ).update_tags (self .user , ['my new tag!' ])
402
+
399
403
job = self ._create_job ('delete_study' , {'study' : 1 })
400
404
private_task (job .id )
401
405
You can’t perform that action at this time.
0 commit comments