Skip to content

Commit f9a9e10

Browse files
committed
Addressing remaining comments
1 parent bb1dd25 commit f9a9e10

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

qiita_db/test/test_meta_util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616

1717
@qiita_test_checker()
1818
class MetaUtilTests(TestCase):
19-
def _set_studies_private(self):
19+
def _set_processed_data_private(self):
2020
self.conn_handler.execute(
2121
"UPDATE qiita.processed_data SET processed_data_status_id=3")
2222

23-
def _set_studies_public(self):
23+
def _set_processed_data_public(self):
2424
self.conn_handler.execute(
2525
"UPDATE qiita.processed_data SET processed_data_status_id=2")
2626

@@ -31,7 +31,7 @@ def _unshare_analyses(self):
3131
self.conn_handler.execute("DELETE FROM qiita.analysis_users")
3232

3333
def test_get_accessible_filepath_ids(self):
34-
self._set_studies_private()
34+
self._set_processed_data_private()
3535

3636
# shared has access to all study files and analysis files
3737

@@ -50,7 +50,7 @@ def test_get_accessible_filepath_ids(self):
5050
self.assertEqual(obs, set())
5151

5252
# Now shared has access to public study files
53-
self._set_studies_public()
53+
self._set_processed_data_public()
5454
obs = get_accessible_filepath_ids(User('shared@foo.bar'))
5555
self.assertEqual(obs, set([1, 2, 5, 6, 7, 11, 16]))
5656

qiita_db/test/test_study.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def setUp(self):
170170
'lab_person_id': StudyPerson(1),
171171
'number_samples_collected': 27}
172172

173-
def _change_studies_status(self, new_status):
173+
def _change_processed_data_status(self, new_status):
174174
# Change the status of the studies by changing the status of their
175175
# processed data
176176
id_status = convert_to_id(new_status, 'processed_data_status',
@@ -180,19 +180,19 @@ def _change_studies_status(self, new_status):
180180
(id_status,))
181181

182182
def test_has_access_public(self):
183-
self._change_studies_status('public')
183+
self._change_processed_data_status('public')
184184
self.assertTrue(self.study.has_access(User("demo@microbio.me")))
185185

186186
def test_has_access_no_public(self):
187-
self._change_studies_status('public')
187+
self._change_processed_data_status('public')
188188
self.assertFalse(self.study.has_access(User("demo@microbio.me"), True))
189189

190190
def test_owner(self):
191191
self.assertEqual(self.study.owner, "test@foo.bar")
192192

193193
def test_share(self):
194194
# Clear all sharing associations
195-
self._change_studies_status('sandbox')
195+
self._change_processed_data_status('sandbox')
196196
self.conn_handler.execute("delete from qiita.study_users")
197197
self.assertEqual(self.study.shared_with, [])
198198

@@ -205,24 +205,24 @@ def test_share(self):
205205
self.assertEqual(self.study.shared_with, ["shared@foo.bar"])
206206

207207
def test_unshare(self):
208-
self._change_studies_status('sandbox')
208+
self._change_processed_data_status('sandbox')
209209
self.study.unshare(User("shared@foo.bar"))
210210
self.assertEqual(self.study.shared_with, [])
211211

212212
def test_has_access_shared(self):
213-
self._change_studies_status('sandbox')
213+
self._change_processed_data_status('sandbox')
214214
self.assertTrue(self.study.has_access(User("shared@foo.bar")))
215215

216216
def test_has_access_private(self):
217-
self._change_studies_status('sandbox')
217+
self._change_processed_data_status('sandbox')
218218
self.assertTrue(self.study.has_access(User("test@foo.bar")))
219219

220220
def test_has_access_admin(self):
221-
self._change_studies_status('sandbox')
221+
self._change_processed_data_status('sandbox')
222222
self.assertTrue(self.study.has_access(User("admin@foo.bar")))
223223

224224
def test_has_access_no_access(self):
225-
self._change_studies_status('sandbox')
225+
self._change_processed_data_status('sandbox')
226226
self.assertFalse(self.study.has_access(User("demo@microbio.me")))
227227

228228
def test_get_by_status(self):
@@ -506,7 +506,7 @@ def test_retrieve_raw_data_none(self):
506506
self.assertEqual(new.raw_data(), [])
507507

508508
def test_add_raw_data(self):
509-
self._change_studies_status('awaiting_approval')
509+
self._change_processed_data_status('awaiting_approval')
510510
new = Study.create(User('test@foo.bar'), 'NOT Identification of the '
511511
'Microbiomes for Cannabis Soils', [1], self.info)
512512
new.add_raw_data([RawData(1), RawData(2)])
@@ -536,7 +536,7 @@ def test_retrieve_processed_data_none(self):
536536
self.assertEqual(new.processed_data(), [])
537537

538538
def test_add_pmid(self):
539-
self._change_studies_status('sandbox')
539+
self._change_processed_data_status('sandbox')
540540
self.study.add_pmid('4544444')
541541
exp = ['123456', '7891011', '4544444']
542542
self.assertEqual(self.study.pmids, exp)

0 commit comments

Comments
 (0)