@@ -56,7 +56,7 @@ def setUp(self):
5656 'metadata_complete' : True ,
5757 'study_title' :
5858 'Identification of the Microbiomes for Cannabis Soils' ,
59- 'num_raw_data' : 4 ,
59+ 'num_raw_data' : 1 ,
6060 'number_samples_collected' : 27 ,
6161 'shared' :
6262 '<a target="_blank" href="mailto:shared@foo.bar">Shared</a>' ,
@@ -201,31 +201,6 @@ def test_update_sample_template(self):
201201 response = self .post ('/study/description/1' , post_args )
202202 self .assertEqual (response .code , 200 )
203203
204- def test_create_raw_data (self ):
205- # testing adding new raw data
206- post_args = {
207- 'filetype' : '1' ,
208- 'action' : 'create_raw_data'
209- }
210- response = self .post ('/study/description/1' , post_args )
211- self .assertEqual (response .code , 200 )
212-
213- # testing an error due to previous raw data already added
214- post_args = {
215- 'previous_raw_data' : '1' ,
216- 'action' : 'create_raw_data'
217- }
218- response = self .post ('/study/description/1' , post_args )
219- self .assertEqual (response .code , 500 )
220-
221- # testing an error due to previous_raw_data not existing
222- post_args = {
223- 'previous_raw_data' : '5' ,
224- 'action' : 'create_raw_data'
225- }
226- response = self .post ('/study/description/1' , post_args )
227- self .assertEqual (response .code , 500 )
228-
229204
230205class TestStudyEditHandler (TestHandlerBase ):
231206 database = True
@@ -360,7 +335,7 @@ class TestSearchStudiesAJAX(TestHandlerBase):
360335 'pmid' : '<a target="_blank" href="http://www.ncbi.nlm.nih.gov/'
361336 'pubmed/123456">123456</a>, <a target="_blank" href="http://www.'
362337 'ncbi.nlm.nih.gov/pubmed/7891011">7891011</a>' ,
363- 'num_raw_data' : 4 ,
338+ 'num_raw_data' : 1 ,
364339 'proc_data_info' : [{
365340 'pid' : 1 ,
366341 'processed_date' : '2012-10-01 09:30:27' ,
@@ -484,12 +459,13 @@ def test_delete_sample_template(self):
484459 def test_delete_raw_data (self ):
485460 response = self .post ('/study/description/1' ,
486461 {'raw_data_id' : 1 ,
462+ 'prep_template_id' : 1 ,
487463 'action' : 'delete_raw_data' })
488464 self .assertEqual (response .code , 200 )
489465
490466 # checking that the action was sent
491- self .assertIn ("Raw data 1 has prep template(s) associated so it can't "
492- "be erased " , response .body )
467+ self .assertIn ("Couldn't remove raw data 1: Raw data (1) can't be "
468+ "remove because it has linked files " , response .body )
493469
494470 def test_delete_prep_template (self ):
495471 response = self .post ('/study/description/1' ,
0 commit comments