Skip to content

Commit fbcd86c

Browse files
committed
update tests
1 parent b6c0f44 commit fbcd86c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

qiita_pet/handlers/study_handlers/listing_handlers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ def _build_single_study_info(study, info, study_proc, proc_samples):
8383
del info["principal_investigator_id"]
8484
del info["email"]
8585
# Build the proc data info list for the child row in datatable
86+
info["proc_data_info"] = []
8687
for data_type, proc_datas in viewitems(study_proc[study.id]):
87-
info["proc_data_info"] = [
88+
info["proc_data_info"].extend([
8889
_build_single_proc_data_info(pd_id, data_type, proc_samples[pd_id])
89-
for pd_id in proc_datas]
90+
for pd_id in proc_datas])
9091
return info
9192

9293

qiita_pet/test/test_study_handlers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_get_shared_links_for_study(self):
7676
self.assertEqual(obs, exp)
7777

7878
def test_build_single_study_info(self):
79-
study_proc = {1: [1]}
79+
study_proc = {1: {'18S': [1]}}
8080
proc_samples = {1: self.proc_data_exp['samples']}
8181
study_info = {
8282
'study_id': 1,
@@ -105,7 +105,8 @@ def test_build_single_study_info(self):
105105
self.assertEqual(obs, self.single_exp)
106106

107107
def test_build_single_proc_data_info(self):
108-
obs = _build_single_proc_data_info(1, self.proc_data_exp['samples'])
108+
obs = _build_single_proc_data_info(1, '18S',
109+
self.proc_data_exp['samples'])
109110
self.assertEqual(obs, self.proc_data_exp)
110111

111112
def test_build_study_info(self):

0 commit comments

Comments
 (0)