@@ -147,44 +147,29 @@ def test_download_study(self):
147
147
148
148
response = self .get ('/download_study_bioms/1' )
149
149
self .assertEqual (response .code , 200 )
150
-
151
150
exp = (
152
- '\- \d+ /protected/processed_data/'
153
- '1_study_1001_closed_reference_otu_table.biom processed_data/'
154
- '1_study_1001_closed_reference_otu_table.biom\n '
155
- '\- \d+ /protected/templates/'
156
- '1_prep_1_\d\d\d\d\d\d\d\d-\d\d\d\d\d\d.txt '
157
- 'mapping_files/\d_mapping_file.txt\n '
158
- '\- \d+ /protected/processed_data/'
159
- '1_study_1001_closed_reference_otu_table.biom '
160
- 'processed_data/1_study_1001_closed_reference_otu_table.biom\n '
161
- '\- \d+ /protected/templates/'
162
- '1_prep_1_\d\d\d\d\d\d\d\d-\d\d\d\d\d\d.txt mapping_files/'
163
- '\d_mapping_file.txt\n '
164
- '\- \d+ /protected/processed_data/'
165
- '1_study_1001_closed_reference_otu_table_Silva.biom '
166
- 'processed_data/'
167
- '1_study_1001_closed_reference_otu_table_Silva.biom\n '
168
- '\- \d+ /protected/templates/'
169
- '1_prep_1_\d\d\d\d\d\d\d\d-\d\d\d\d\d\d.txt '
170
- 'mapping_files/6_mapping_file.txt\n '
171
- '\- \d+ /protected/BIOM/7/biom_table.biom BIOM/7/'
172
- 'biom_table.biom\n '
173
- '\- \d+ /protected/templates/'
174
- '1_prep_2_\d\d\d\d\d\d\d\d-\d\d\d\d\d\d.txt '
175
- 'mapping_files/7_mapping_file.txt\n '
176
- '\- \d+ /protected/BIOM/10/otu_table.biom '
177
- 'BIOM/10/otu_table.biom\n '
178
- '\- \d+ /protected/BIOM/10/sortmerna_picked_otus/seqs_otus.log '
179
- 'BIOM/10/sortmerna_picked_otus/seqs_otus.log\n '
180
- '\- \d+ /protected/templates/'
181
- '1_prep_1_\d\d\d\d\d\d\d\d-\d\d\d\d\d\d.txt '
182
- 'mapping_files/10_mapping_file.txt\n '
183
- )
184
-
185
- obs = response .body .decode ('ascii' )
186
-
187
- self .assertRegex (obs , exp )
151
+ '- \\ d+ /protected/processed_data/1_study_1001_closed_reference_'
152
+ 'otu_table.biom processed_data/1_study_1001_closed_reference_otu'
153
+ '_table.biom\n '
154
+ '- \\ d+ /protected/templates/1_prep_1_qiime_19700101-000000.txt '
155
+ 'mapping_files/4_mapping_file.txt\n '
156
+ '- \\ d+ /protected/processed_data/1_study_1001_closed_reference_'
157
+ 'otu_table.biom processed_data/1_study_1001_closed_reference_otu'
158
+ '_table.biom\n '
159
+ '- \\ d+ /protected/templates/1_prep_1_qiime_19700101-000000.txt '
160
+ 'mapping_files/5_mapping_file.txt\n '
161
+ '- \\ d+ /protected/processed_data/1_study_1001_closed_reference_'
162
+ 'otu_table_Silva.biom processed_data/1_study_1001_closed_'
163
+ 'reference_otu_table_Silva.biom\n '
164
+ '- \\ d+ /protected/templates/1_prep_1_qiime_19700101-000000.txt '
165
+ 'mapping_files/6_mapping_file.txt\n '
166
+ '- \\ d+ /protected/BIOM/7/biom_table.biom BIOM/7/biom_table.biom\n '
167
+ '- \\ d+ /protected/BIOM/10/otu_table.biom BIOM/10/otu_table.biom\n '
168
+ '- \\ d+ /protected/BIOM/10/sortmerna_picked_otus/seqs_otus.log '
169
+ 'BIOM/10/sortmerna_picked_otus/seqs_otus.log\n '
170
+ '- \\ d+ /protected/templates/1_prep_1_qiime_19700101-000000.txt '
171
+ 'mapping_files/10_mapping_file.txt\n ' )
172
+ self .assertRegex (response .body .decode ('ascii' ), exp )
188
173
189
174
response = self .get ('/download_study_bioms/200' )
190
175
self .assertEqual (response .code , 405 )
@@ -201,10 +186,9 @@ def test_download_study(self):
201
186
a .visibility = 'private'
202
187
self .assertEqual (response .code , 200 )
203
188
# we should have the same files than the previous test, except artifact
204
- # and mapping file 7: position 6 and 7 ; thus removing 6 twice
189
+ # and mapping file 7: position 6; thus removing 6
205
190
exp = exp .split ('\n ' )
206
191
exp .pop (6 )
207
- exp .pop (6 )
208
192
exp = '\n ' .join (exp )
209
193
self .assertRegex (response .body .decode ('ascii' ), exp )
210
194
@@ -255,7 +239,7 @@ def test_download_raw_data(self):
255
239
'- 58 /protected/raw_data/'
256
240
'1_s_G1_L001_sequences_barcodes.fastq.gz '
257
241
'raw_data/1_s_G1_L001_sequences_barcodes.fastq.gz\n '
258
- '- [0-9]* /protected/templates/1_prep_1_ [0-9]*-[0-9]*.txt '
242
+ '- [0-9]* /protected/templates/1_prep_1_qiime_ [0-9]*-[0-9]*.txt '
259
243
'mapping_files/1_mapping_file.txt\n '
260
244
'- 1093210 /protected/BIOM/7/biom_table.biom '
261
245
'BIOM/7/biom_table.biom\n ' )
@@ -284,8 +268,8 @@ def test_download_raw_data(self):
284
268
return_value = User (
"[email protected] " ))
285
269
response = self .get ('/download_study_bioms/1' )
286
270
self .assertEqual (response .code , 200 )
287
- exp = ('- [0-9]* /protected/templates/1_prep_2_[0-9]*-[0-9]*.txt '
288
- 'mapping_files/7_mapping_file.txt \n ' )
271
+ exp = ('- [0-9]* /protected/BIOM/7/biom_table.biom '
272
+ 'BIOM/7/biom_table.biom \n ' )
289
273
self .assertRegex (response .body .decode ('ascii' ), exp )
290
274
291
275
@@ -517,8 +501,8 @@ def test_download_sample_information(self):
517
501
response = self .get (
518
502
'/public_download/?data=prep_information&prep_id=1' )
519
503
self .assertEqual (response .code , 200 )
520
- exp = ('[0-9]* [0-9]* /protected/templates/1_prep_1_ [0-9]*-[0-9]'
521
- '*.txt templates/1_prep_1_ [0-9]*-[0-9]*.txt\n ' )
504
+ exp = ('- [0-9]* /protected/templates/1_prep_1_qiime_ [0-9]*-[0-9]'
505
+ '*.txt templates/1_prep_1_qiime_ [0-9]*-[0-9]*.txt\n ' )
522
506
self .assertRegex (response .body .decode ('ascii' ), exp )
523
507
524
508
0 commit comments