@@ -147,32 +147,28 @@ def test_download_study(self):
147
147
148
148
response = self .get ('/download_study_bioms/1' )
149
149
self .assertEqual (response .code , 200 )
150
+
150
151
exp = (
151
- '- 1256812 /protected/processed_data/'
152
- '1_study_1001_closed_reference_otu_table.biom processed_data/'
153
- '1_study_1001_closed_reference_otu_table.biom\n '
154
- '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000.txt '
155
- 'mapping_files/4_mapping_file.txt\n '
156
- '- 1256812 /protected/processed_data/'
157
- '1_study_1001_closed_reference_otu_table.biom processed_data/'
158
- '1_study_1001_closed_reference_otu_table.biom\n '
159
- '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000.txt '
160
- 'mapping_files/5_mapping_file.txt\n '
161
- '- 1256812 /protected/processed_data/1_study_1001_'
162
- 'closed_reference_otu_table_Silva.biom processed_data/'
163
- '1_study_1001_closed_reference_otu_table_Silva.biom\n '
164
- '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000.txt '
165
- 'mapping_files/6_mapping_file.txt\n '
166
- '- 1093210 /protected/BIOM/7/biom_table.biom '
167
- 'BIOM/7/biom_table.biom\n '
168
- '- [0-9]* /protected/BIOM/{0}/otu_table.biom '
169
- 'BIOM/{0}/otu_table.biom\n '
170
- '- 1 /protected/BIOM/10/sortmerna_picked_otus/seqs_otus.log '
171
- 'BIOM/{0}/sortmerna_picked_otus/seqs_otus.log\n '
172
- '- [0-9]* /protected/templates/1_prep_1_qiime_19700101-000000.txt '
173
- 'mapping_files/{0}_mapping_file.txt\n ' .format (a .id ))
152
+ '\- \d+ /protected/processed_data/1_study_1001_closed_reference_otu_table.biom processed_data/1_study_1001_closed_reference_otu_table.biom\n '
153
+ '\- \d+ /protected/templates/1_prep_1_\d\d\d\d\d\d\d\d-\d\d\d\d\d\d.txt mapping_files/\d_mapping_file.txt\n '
154
+ '\- \d+ /protected/processed_data/1_study_1001_closed_reference_otu_table.biom processed_data/1_study_1001_closed_reference_otu_table.biom\n '
155
+ '\- \d+ /protected/templates/1_prep_1_\d\d\d\d\d\d\d\d-\d\d\d\d\d\d.txt mapping_files/\d_mapping_file.txt\n '
156
+ '\- \d+ /protected/processed_data/1_study_1001_closed_reference_otu_table_Silva.biom processed_data/1_study_1001_closed_reference_otu_table_Silva.biom\n '
157
+ '\- \d+ /protected/templates/1_prep_1_\d\d\d\d\d\d\d\d-\d\d\d\d\d\d.txt mapping_files/6_mapping_file.txt\n '
158
+ '\- \d+ /protected/BIOM/7/biom_table.biom BIOM/7/biom_table.biom\n '
159
+ '\- \d+ /protected/templates/1_prep_2_\d\d\d\d\d\d\d\d-\d\d\d\d\d\d.txt mapping_files/7_mapping_file.txt\n '
160
+ '\- \d+ /protected/BIOM/10/otu_table.biom BIOM/10/otu_table.biom\n '
161
+ '\- \d+ /protected/BIOM/10/sortmerna_picked_otus/seqs_otus.log BIOM/10/sortmerna_picked_otus/seqs_otus.log\n '
162
+ '\- \d+ /protected/templates/1_prep_1_\d\d\d\d\d\d\d\d-\d\d\d\d\d\d.txt mapping_files/10_mapping_file.txt\n '
163
+ )
164
+
165
+ obs = response .body .decode ('ascii' )
166
+ with open ('A' , 'w' ) as f :
167
+ f .write ("%s\n " % obs )
168
+ with open ('B' , 'w' ) as f :
169
+ f .write ("%s\n " % exp )
174
170
175
- self .assertRegex (response .body .decode ('ascii' ), exp [ 10 ] )
171
+ self .assertRegex (response .body .decode ('ascii' ), exp )
176
172
177
173
response = self .get ('/download_study_bioms/200' )
178
174
self .assertEqual (response .code , 405 )
0 commit comments