@@ -151,29 +151,28 @@ def test_download_study(self):
151
151
'- 1256812 /protected/processed_data/'
152
152
'1_study_1001_closed_reference_otu_table.biom processed_data/'
153
153
'1_study_1001_closed_reference_otu_table.biom\n '
154
- '- [0-9]* /protected/templates/1_prep_1_[0-9]*-[0-9]* .txt '
154
+ '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000 .txt '
155
155
'mapping_files/4_mapping_file.txt\n '
156
156
'- 1256812 /protected/processed_data/'
157
157
'1_study_1001_closed_reference_otu_table.biom processed_data/'
158
158
'1_study_1001_closed_reference_otu_table.biom\n '
159
- '- [0-9]* /protected/templates/1_prep_1_[0-9]*-[0-9]* .txt '
159
+ '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000 .txt '
160
160
'mapping_files/5_mapping_file.txt\n '
161
161
'- 1256812 /protected/processed_data/1_study_1001_'
162
162
'closed_reference_otu_table_Silva.biom processed_data/'
163
163
'1_study_1001_closed_reference_otu_table_Silva.biom\n '
164
- '- [0-9]* /protected/templates/1_prep_1_[0-9]*-[0-9]* .txt '
164
+ '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000 .txt '
165
165
'mapping_files/6_mapping_file.txt\n '
166
166
'- 1093210 /protected/BIOM/7/biom_table.biom '
167
167
'BIOM/7/biom_table.biom\n '
168
- '- [0-9]* /protected/templates/1_prep_2_[0-9]*-[0-9]*.txt '
169
- 'mapping_files/7_mapping_file.txt\n '
170
168
'- [0-9]* /protected/BIOM/{0}/otu_table.biom '
171
169
'BIOM/{0}/otu_table.biom\n '
172
170
'- 1 /protected/BIOM/10/sortmerna_picked_otus/seqs_otus.log '
173
171
'BIOM/{0}/sortmerna_picked_otus/seqs_otus.log\n '
174
- '- [0-9]* /protected/templates/1_prep_1_[0-9]*-[0-9]* .txt '
172
+ '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000 .txt '
175
173
'mapping_files/{0}_mapping_file.txt\n ' .format (a .id ))
176
- self .assertRegex (response .body .decode ('ascii' ), exp )
174
+
175
+ self .assertRegex (response .body .decode ('ascii' ), exp [10 ])
177
176
178
177
response = self .get ('/download_study_bioms/200' )
179
178
self .assertEqual (response .code , 405 )
@@ -405,17 +404,16 @@ def test_download(self):
405
404
# check success
406
405
response = self .get ('/public_download/?data=biom&study_id=1' )
407
406
self .assertEqual (response .code , 200 )
408
- exp = ('- [0-9]* /protected/templates/1_prep_2_[0-9]*-[0-9]*.txt '
409
- 'mapping_files/7_mapping_file.txt \n ' )
407
+ exp = ('- [0-9]* /protected/BIOM/7/biom_table.biom '
408
+ ' BIOM/7/biom_table.biom \n ' )
410
409
self .assertRegex (response .body .decode ('ascii' ), exp )
411
410
412
411
Study (1 ).public_raw_download = True
413
412
# check success
414
413
response = self .get ('/public_download/?data=raw&study_id=1' )
415
414
self .assertEqual (response .code , 200 )
416
- exp = (
417
- '- [0-9]* /protected/templates/1_prep_2_[0-9]*-[0-9]*.txt '
418
- 'mapping_files/7_mapping_file.txt\n ' )
415
+ exp = ('- [0-9]* /protected/BIOM/7/biom_table.biom'
416
+ ' BIOM/7/biom_table.biom\n ' )
419
417
self .assertRegex (response .body .decode ('ascii' ), exp )
420
418
421
419
# testing data_type
@@ -446,7 +444,7 @@ def test_download(self):
446
444
exp = (
447
445
'[0-9]* [0-9]* /protected/raw_data/1_s_G1_L001_sequences_barcodes'
448
446
'.fastq.gz raw_data/1_s_G1_L001_sequences_barcodes.fastq.gz\n '
449
- '- [0-9]* /protected/templates/1_prep_1_[0-9]*-[0-9]* .txt '
447
+ '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000 .txt '
450
448
'mapping_files/1_mapping_file.txt' )
451
449
self .assertRegex (response .body .decode ('ascii' ), exp )
452
450
@@ -457,11 +455,12 @@ def test_download(self):
457
455
'- [0-9]* /protected/processed_data/1_study_1001_closed_'
458
456
'reference_otu_table.biom processed_data/1_study_1001_closed_'
459
457
'reference_otu_table.biom\n - [0-9]* /protected/templates/1_prep_'
460
- '1_[0-9]*-[0-9]* .txt mapping_files/4_mapping_file.txt\n '
458
+ '1_qiime_19700101-000000 .txt mapping_files/4_mapping_file.txt\n '
461
459
'- [0-9]* /protected/processed_data/1_study_1001_closed_'
462
460
'reference_otu_table.biom processed_data/1_study_1001_closed_'
463
- 'reference_otu_table.biom\n - [0-9]* /protected/templates/1_prep_1'
464
- '_[0-9]*-[0-9]*.txt mapping_files/5_mapping_file.txt\n ' )
461
+ 'reference_otu_table.biom\n - [0-9]* /protected/templates/1_prep_'
462
+ '1_qiime_19700101-000000.txt mapping_files/5_mapping_file.txt\n ' )
463
+
465
464
self .assertRegex (response .body .decode ('ascii' ), exp )
466
465
467
466
def test_download_sample_information (self ):
@@ -535,7 +534,7 @@ def test_download(self):
535
534
'- [0-9]* /protected/processed_data/'
536
535
'1_study_1001_closed_reference_otu_table.biom '
537
536
'processed_data/1_study_1001_closed_reference_otu_table.biom\n '
538
- '- [0-9]* /protected/templates/1_prep_1_[0-9]*-[0-9]* .txt '
537
+ '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000 .txt '
539
538
'mapping_files/5_mapping_file.txt' )
540
539
self .assertRegex (response .body .decode ('ascii' ), exp )
541
540
@@ -556,13 +555,12 @@ def test_download(self):
556
555
o = urlparse (resp_dict ["url" ])
557
556
response_file = self .get (o .path )
558
557
self .assertEqual (response_file .code , 200 )
559
-
560
558
exp = (
561
559
'- 58 /protected/raw_data/1_s_G1_L001_sequences.fastq.gz '
562
560
'raw_data/1_s_G1_L001_sequences.fastq.gz\n '
563
561
'- 58 /protected/raw_data/1_s_G1_L001_sequences_barcodes.'
564
562
'fastq.gz raw_data/1_s_G1_L001_sequences_barcodes.fastq.gz\n '
565
- '- [0-9]* /protected/templates/1_prep_1_[0-9]*-[0-9]* .txt '
563
+ '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000 .txt '
566
564
'mapping_files/1_mapping_file.txt\n '
567
565
)
568
566
self .assertRegex (response_file .body .decode ('ascii' ), exp )
0 commit comments