@@ -242,19 +242,20 @@ def test_get_preprocess_fasta_cmd_sff_run_prefix(self):
242
242
def test_get_preprocess_fasta_cmd_sff_run_prefix_match (self ):
243
243
# Test that the run prefixes in the prep_template and the file names
244
244
# actually match and raise an error if not
245
+ new_fp_id = get_count ('qiita.filepath' ) + 1
245
246
conn_handler = SQLConnectionHandler ()
246
247
sql = ("""
247
248
INSERT INTO qiita.filepath (filepath_id, filepath,
248
249
filepath_type_id, checksum, checksum_algorithm_id,
249
- data_directory_id) VALUES (19 , '1_new.sff', 17, 852952723, 1,
250
+ data_directory_id) VALUES (%s , '1_new.sff', 17, 852952723, 1,
250
251
5);
251
252
INSERT INTO qiita.raw_filepath (raw_data_id , filepath_id) VALUES
252
- (3, 19 );
253
+ (3, %s );
253
254
UPDATE qiita.prep_1 SET run_prefix='preprocess_test';
254
255
UPDATE qiita.prep_1 SET run_prefix='new' WHERE
255
256
sample_id = '1.SKB8.640193';
256
257
""" )
257
- conn_handler .execute (sql )
258
+ conn_handler .execute (sql , ( new_fp_id , new_fp_id ) )
258
259
259
260
raw_data = RawData (3 )
260
261
params = Preprocessed454Params (1 )
@@ -287,25 +288,27 @@ def test_get_preprocess_fasta_cmd_sff_run_prefix_match(self):
287
288
def test_get_preprocess_fasta_cmd_sff_run_prefix_match_error_1 (self ):
288
289
# Test that the run prefixes in the prep_template and the file names
289
290
# actually match and raise an error if not
291
+ fp_count = get_count ('qiita.filepath' )
290
292
conn_handler = SQLConnectionHandler ()
291
293
sql = ("""
292
294
INSERT INTO qiita.filepath (filepath_id, filepath,
293
295
filepath_type_id, checksum, checksum_algorithm_id,
294
- data_directory_id) VALUES (19 , '1_new.sff', 17, 852952723, 1,
296
+ data_directory_id) VALUES (%s , '1_new.sff', 17, 852952723, 1,
295
297
5);
296
298
INSERT INTO qiita.raw_filepath (raw_data_id , filepath_id) VALUES
297
- (3, 19 );
299
+ (3, %s );
298
300
INSERT INTO qiita.filepath (filepath_id, filepath,
299
301
filepath_type_id, checksum, checksum_algorithm_id,
300
- data_directory_id) VALUES (20 , '1_error.sff', 17, 852952723,
302
+ data_directory_id) VALUES (%s , '1_error.sff', 17, 852952723,
301
303
1, 5);
302
304
INSERT INTO qiita.raw_filepath (raw_data_id , filepath_id) VALUES
303
- (3, 20 );
305
+ (3, %s );
304
306
UPDATE qiita.prep_1 SET run_prefix='preprocess_test';
305
307
UPDATE qiita.prep_1 SET run_prefix='new' WHERE
306
308
sample_id = '1.SKB8.640193';
307
309
""" )
308
- conn_handler .execute (sql )
310
+ conn_handler .execute (
311
+ sql , (fp_count + 1 , fp_count + 1 , fp_count + 2 , fp_count + 2 ))
309
312
310
313
raw_data = RawData (3 )
311
314
params = Preprocessed454Params (1 )
0 commit comments