Skip to content

Commit a74fd0f

Browse files
committed
addressing @ElDeveloper comment
1 parent 3974fb7 commit a74fd0f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

qiita_db/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ def delete(cls, ppd_id):
829829
ppd = cls(ppd_id)
830830
if ppd.status != 'sandbox':
831831
raise QiitaDBStatusError(
832-
"Illegal operation on non sandbox preprocessed data")
832+
"Illegal operation on non sandboxed preprocessed data")
833833
elif ppd.submitted_to_vamps_status() not in valid_submission_states:
834834
raise QiitaDBStatusError(
835835
"Illegal operation. This preprocessed data has or is being "
@@ -1342,7 +1342,7 @@ def delete(cls, processed_data_id):
13421342
"""
13431343
if cls(processed_data_id).status != 'sandbox':
13441344
raise QiitaDBStatusError(
1345-
"Illegal operation on non sandbox processed data")
1345+
"Illegal operation on non sandboxed processed data")
13461346

13471347
conn_handler = SQLConnectionHandler()
13481348

qiita_db/test/test_data.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,19 @@ def test_delete_basic(self):
488488
ebi_study_accession=self.ebi_study_accession)
489489
PreprocessedData.delete(ppd.id)
490490

491-
# testing that it raises an error if ID doesn't exist
491+
# testing that the deleted preprocessed data can't be instantiated
492+
with self.assertRaises(QiitaDBUnknownIDError):
493+
PreprocessedData(ppd.id)
494+
# and for completeness testing that it raises an error if ID
495+
# doesn't exist
492496
with self.assertRaises(QiitaDBUnknownIDError):
493497
PreprocessedData.delete(ppd.id)
494498

495499
# testing that we can not remove cause the preprocessed data != sandbox
496500
with self.assertRaises(QiitaDBStatusError):
497501
PreprocessedData.delete(1)
498502

499-
def test_delete_advance(self):
503+
def test_delete_advanced(self):
500504
# testing that we can not remove cause preprocessed data has been
501505
# submitted to EBI or VAMPS
502506
ppd = PreprocessedData.create(

0 commit comments

Comments
 (0)