@@ -150,8 +150,7 @@ def setUp(self):
150150 "study_abstract" : "Exploring how a high fat diet changes the "
151151 "gut microbiome" ,
152152 "principal_investigator_id" : qdb .study .StudyPerson (3 ),
153- "lab_person_id" : qdb .study .StudyPerson (1 ),
154- 'specimen_id_column' : None
153+ "lab_person_id" : qdb .study .StudyPerson (1 )
155154 }
156155
157156 self .infoexp = {
@@ -165,7 +164,6 @@ def setUp(self):
165164 "gut microbiome" ,
166165 "principal_investigator" : qdb .study .StudyPerson (3 ),
167166 "lab_person" : qdb .study .StudyPerson (1 ),
168- 'specimen_id_column' : None ,
169167 'public_raw_download' : False
170168 }
171169
@@ -193,8 +191,7 @@ def setUp(self):
193191 'study_description' : 'Analysis of the Cannabis Plant Microbiome' ,
194192 'study_alias' : 'Cannabis Soils' ,
195193 'most_recent_contact' : datetime (2014 , 5 , 19 , 16 , 11 ),
196- 'lab_person' : qdb .study .StudyPerson (1 ),
197- 'specimen_id_column' : None }
194+ 'lab_person' : qdb .study .StudyPerson (1 )}
198195
199196 def tearDown (self ):
200197 qiita_config .portal = self .portal
@@ -251,8 +248,7 @@ def test_get_info(self):
251248 'Soils' ,
252249 'ebi_submission_status' : 'submitted' ,
253250 'ebi_study_accession' : 'EBI123456-BB' ,
254- 'autoloaded' : False ,
255- 'specimen_id_column' : None }
251+ 'autoloaded' : False }
256252 self .assertDictEqual (obs , exp )
257253
258254 # Test get specific keys for single study
@@ -446,8 +442,7 @@ def test_create_study_min_data(self):
446442 'study_alias' : 'FCM' ,
447443 'most_recent_contact' : None ,
448444 'lab_person' : qdb .study .StudyPerson (1 ),
449- 'notes' : '' ,
450- 'specimen_id_column' : None }
445+ 'notes' : '' }
451446 self .assertEqual (obs_info , exp )
452447 # Check the timestamp separately, since it is set by the database
453448 # to the microsecond, and we can't predict it a priori
@@ -529,8 +524,7 @@ def test_create_study_all_data(self):
529524 'study_alias' : 'FCM' ,
530525 'most_recent_contact' : None ,
531526 'lab_person' : qdb .study .StudyPerson (1 ),
532- 'notes' : 'an analysis was performed \n here and \n here' ,
533- 'specimen_id_column' : None }
527+ 'notes' : 'an analysis was performed \n here and \n here' }
534528 self .assertEqual (obs .info , exp )
535529 self .assertEqual (obs .shared_with , [])
536530 self .assertEqual (obs .publications , [])
@@ -912,31 +906,6 @@ def test_study_tags(self):
912906 self .assertEqual (study .tags , [])
913907 self .assertEqual (message , '' )
914908
915- def test_specimen_id_column_get_set (self ):
916- self .assertEqual (self .study .specimen_id_column , None )
917- self .study .specimen_id_column = 'anonymized_name'
918- self .assertEqual (self .study .specimen_id_column , 'anonymized_name' )
919- self .study .specimen_id_column = None
920- self .assertEqual (self .study .specimen_id_column , None )
921-
922- def test_specimen_id_column_not_unique (self ):
923- with self .assertRaises (qdb .exceptions .QiitaDBColumnError ):
924- self .study .specimen_id_column = 'dna_extracted'
925-
926- def test_specimen_id_column_doesnt_exist (self ):
927- with self .assertRaises (qdb .exceptions .QiitaDBLookupError ):
928- self .study .specimen_id_column = 'foo'
929-
930- def test_specimen_id_column_no_sample_information (self ):
931- empty = qdb .study .Study .create (
932- qdb .
user .
User (
'[email protected] ' ),
"Fried duck microbiome" ,
933- self .info )
934- with self .assertRaises (qdb .exceptions .QiitaDBLookupError ):
935- empty .specimen_id_column = 'foo'
936-
937- # cleaning up the created study
938- qdb .study .Study .delete (empty ._id )
939-
940909
941910if __name__ == "__main__" :
942911 main ()
0 commit comments