@@ -170,7 +170,7 @@ def setUp(self):
170
170
'lab_person_id' : StudyPerson (1 ),
171
171
'number_samples_collected' : 27 }
172
172
173
- def _change_studies_status (self , new_status ):
173
+ def _change_processed_data_status (self , new_status ):
174
174
# Change the status of the studies by changing the status of their
175
175
# processed data
176
176
id_status = convert_to_id (new_status , 'processed_data_status' ,
@@ -180,19 +180,19 @@ def _change_studies_status(self, new_status):
180
180
(id_status ,))
181
181
182
182
def test_has_access_public (self ):
183
- self ._change_studies_status ('public' )
183
+ self ._change_processed_data_status ('public' )
184
184
self .assertTrue (self .study .has_access (User ("demo@microbio.me" )))
185
185
186
186
def test_has_access_no_public (self ):
187
- self ._change_studies_status ('public' )
187
+ self ._change_processed_data_status ('public' )
188
188
self .assertFalse (self .study .has_access (User ("demo@microbio.me" ), True ))
189
189
190
190
def test_owner (self ):
191
191
self .assertEqual (self .study .owner , "test@foo.bar" )
192
192
193
193
def test_share (self ):
194
194
# Clear all sharing associations
195
- self ._change_studies_status ('sandbox' )
195
+ self ._change_processed_data_status ('sandbox' )
196
196
self .conn_handler .execute ("delete from qiita.study_users" )
197
197
self .assertEqual (self .study .shared_with , [])
198
198
@@ -205,24 +205,24 @@ def test_share(self):
205
205
self .assertEqual (self .study .shared_with , ["shared@foo.bar" ])
206
206
207
207
def test_unshare (self ):
208
- self ._change_studies_status ('sandbox' )
208
+ self ._change_processed_data_status ('sandbox' )
209
209
self .study .unshare (User ("shared@foo.bar" ))
210
210
self .assertEqual (self .study .shared_with , [])
211
211
212
212
def test_has_access_shared (self ):
213
- self ._change_studies_status ('sandbox' )
213
+ self ._change_processed_data_status ('sandbox' )
214
214
self .assertTrue (self .study .has_access (User ("shared@foo.bar" )))
215
215
216
216
def test_has_access_private (self ):
217
- self ._change_studies_status ('sandbox' )
217
+ self ._change_processed_data_status ('sandbox' )
218
218
self .assertTrue (self .study .has_access (User ("test@foo.bar" )))
219
219
220
220
def test_has_access_admin (self ):
221
- self ._change_studies_status ('sandbox' )
221
+ self ._change_processed_data_status ('sandbox' )
222
222
self .assertTrue (self .study .has_access (User ("admin@foo.bar" )))
223
223
224
224
def test_has_access_no_access (self ):
225
- self ._change_studies_status ('sandbox' )
225
+ self ._change_processed_data_status ('sandbox' )
226
226
self .assertFalse (self .study .has_access (User ("demo@microbio.me" )))
227
227
228
228
def test_get_by_status (self ):
@@ -506,7 +506,7 @@ def test_retrieve_raw_data_none(self):
506
506
self .assertEqual (new .raw_data (), [])
507
507
508
508
def test_add_raw_data (self ):
509
- self ._change_studies_status ('awaiting_approval' )
509
+ self ._change_processed_data_status ('awaiting_approval' )
510
510
new = Study .create (User ('test@foo.bar' ), 'NOT Identification of the '
511
511
'Microbiomes for Cannabis Soils' , [1 ], self .info )
512
512
new .add_raw_data ([RawData (1 ), RawData (2 )])
@@ -536,7 +536,7 @@ def test_retrieve_processed_data_none(self):
536
536
self .assertEqual (new .processed_data (), [])
537
537
538
538
def test_add_pmid (self ):
539
- self ._change_studies_status ('sandbox' )
539
+ self ._change_processed_data_status ('sandbox' )
540
540
self .study .add_pmid ('4544444' )
541
541
exp = ['123456' , '7891011' , '4544444' ]
542
542
self .assertEqual (self .study .pmids , exp )
0 commit comments