File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -74,18 +74,18 @@ def tearDown(self):
74
74
remove (fp )
75
75
for dp in self .dirs_to_remove :
76
76
if exists (dp ):
77
- remove (dp )
77
+ rmtree (dp )
78
78
79
79
def test_import_preprocessed_data (self ):
80
-
81
- import_preprocessed_data ( 1 , self . tmpdir , 1 ,
82
- 'preprocessed_sequence_illumina_params' ,
83
- 1 , False )
84
- sql = ( "select preprocessed_data_id from qitta.preprocessed_data"
85
- "where study_id = %s and preprocessed_params_table = %s" )
86
- ppd_ids = self .conn_handler . execute_fetchall (
87
- sql , ( '1' , 'preprocessed_sequence_illumina_params' ))
88
- self .assertEqual ( len ( ppd_ids ), 2 )
80
+ initial_ppd_count = get_count ( 'qiita.preprocessed_data' )
81
+ initial_fp_count = get_count ( 'qiita.filepath' )
82
+ ppd = import_preprocessed_data ( 1 , self . tmpdir , 1 ,
83
+ 'preprocessed_sequence_illumina_params' ,
84
+ 1 , False )
85
+ self . assertEqual ( ppd . id , 3 )
86
+ self .assertTrue ( check_count ( 'qiita.preprocessed_data' ,
87
+ initial_ppd_count + 1 ))
88
+ self .assertTrue ( check_count ( 'qiita.filepath' , initial_fp_count + 2 ) )
89
89
90
90
91
91
@qiita_test_checker ()
You can’t perform that action at this time.
0 commit comments