[hg] galaxy 3510: Revert the twilltestcase upload_composite code...
details: http://www.bx.psu.edu/hg/galaxy/rev/2af472aa0844 changeset: 3510:2af472aa0844 user: fubar: ross Lazarus at gmail period com date: Wed Mar 10 17:10:43 2010 -0500 description: Revert the twilltestcase upload_composite code needed for lped/pbed upload testing diffstat: test/base/twilltestcase.py | 54 ++++++++++++++++++++++++++++++++++++++++ test/functional/test_get_data.py | 6 ++-- test/functional/test_toolbox.py | 1 + 3 files changed, 58 insertions(+), 3 deletions(-) diffs (100 lines): diff -r 26c40d8e8fdc -r 2af472aa0844 test/base/twilltestcase.py --- a/test/base/twilltestcase.py Wed Mar 10 16:23:53 2010 -0500 +++ b/test/base/twilltestcase.py Wed Mar 10 17:10:43 2010 -0500 @@ -196,6 +196,60 @@ # Wait for upload processing to finish (TODO: this should be done in each test case instead) self.wait() + def upload_composite_datatype_file( self, ftype, ped_file='', map_file='', bim_file='', bed_file='', + fped_file='',fphe_file='',pphe_file='',fam_file='',pheno_file='',eset_file='',malist_file='', + affybatch_file='', dbkey='unspecified (?)', base_name='rgenetics' ): + """Tests uploading either of 2 different composite data types ( lped and pbed )""" + self.visit_url( "%s/tool_runner/index?tool_id=upload1" % self.url ) + # Handle refresh_on_change + self.refresh_form( "file_type", ftype ) + tc.fv( "1", "dbkey", dbkey ) + tc.fv( "1", "files_metadata|base_name", base_name ) + if ftype == 'lped': + # lped data types include a ped_file and a map_file + ped_file = self.get_filename( ped_file ) + tc.formfile( "1", "files_0|file_data", ped_file ) + map_file = self.get_filename( map_file ) + tc.formfile( "1", "files_1|file_data", map_file ) + elif ftype == 'pbed': + # pbed data types include a bim_file, a bed_file and a fam_file + bim_file = self.get_filename( bim_file ) + tc.formfile( "1", "files_0|file_data", bim_file ) + bed_file = self.get_filename( bed_file ) + tc.formfile( "1", "files_1|file_data", bed_file ) + fam_file = self.get_filename( fam_file ) + tc.formfile( "1", "files_2|file_data", fam_file ) + elif ftype == 'pphe': + # pphe data types include a phe_file + pphe_file = self.get_filename( pphe_file ) + tc.formfile( "1", "files_0|file_data", pphe_file ) + elif ftype == 'fped': + # fped data types include an fped_file only + fped_file = self.get_filename( fped_file ) + tc.formfile( "1", "files_0|file_data", fped_file ) + elif ftype == 'eset': + # eset data types include a eset_file, a pheno_file + eset_file = self.get_filename( eset_file ) + tc.formfile( "1", "files_0|file_data", eset_file ) + pheno_file = self.get_filename( pheno_file ) + tc.formfile( "1", "files_1|file_data", pheno_file ) + elif ftype == 'affybatch': + # affybatch data types include an affybatch_file, and a pheno_file + affybatch_file = self.get_filename( affybatch_file ) + tc.formfile( "1", "files_0|file_data", affybatch_file ) + pheno_file = self.get_filename( pheno_file ) + tc.formfile( "1", "files_1|file_data", pheno_file ) + else: + raise AssertionError, "Unsupported composite data type (%s) received, currently only %s data types are supported."\ + % (ftype,','.join(self.composite_extensions)) + tc.submit( "runtool_btn" ) + self.check_page_for_string( 'The following job has been succesfully added to the queue:' ) + check_str = base_name #'Uploaded Composite Dataset (%s)' % ftype + self.check_page_for_string( check_str ) + # Wait for upload processing to finish (TODO: this should be done in each test case instead) + self.wait() + self.check_history_for_string( check_str ) + # Functions associated with histories def check_history_for_errors( self ): """Raises an exception if there are errors in a history""" diff -r 26c40d8e8fdc -r 2af472aa0844 test/functional/test_get_data.py --- a/test/functional/test_get_data.py Wed Mar 10 16:23:53 2010 -0500 +++ b/test/functional/test_get_data.py Wed Mar 10 17:10:43 2010 -0500 @@ -183,7 +183,7 @@ # We'll test against the resulting ped file and map file for correctness self.verify_composite_datatype_file_content( 'rgenetics.ped', str( hda.id ) ) self.verify_composite_datatype_file_content( 'rgenetics.map', str( hda.id ) ) - self.check_history_for_string( "Uploaded Composite Dataset (lped)" ) + self.check_history_for_string( "rgenetics" ) self.delete_history( id=self.security.encode_id( history.id ) ) def test_0060_upload_file( self ): """Test uploading pbed composite datatype file, manually setting the file format""" @@ -205,7 +205,7 @@ self.verify_composite_datatype_file_content( 'rgenetics.bim', str( hda.id ) ) self.verify_composite_datatype_file_content( 'rgenetics.bed', str( hda.id ) ) self.verify_composite_datatype_file_content( 'rgenetics.fam', str( hda.id ) ) - self.check_history_for_string( "Uploaded Composite Dataset (pbed)" ) + self.check_history_for_string( "rgenetics" ) self.delete_history( id=self.security.encode_id( history.id ) ) def test_0065_upload_file( self ): """Test uploading asian_chars_1.txt, NOT setting the file format""" @@ -576,4 +576,4 @@ self.check_history_for_string( 'hello world' ) self.delete_history( id=self.security.encode_id( history.id ) ) def test_9999_clean_up( self ): - self.logout() \ No newline at end of file + self.logout() diff -r 26c40d8e8fdc -r 2af472aa0844 test/functional/test_toolbox.py --- a/test/functional/test_toolbox.py Wed Mar 10 16:23:53 2010 -0500 +++ b/test/functional/test_toolbox.py Wed Mar 10 17:10:43 2010 -0500 @@ -161,3 +161,4 @@ m.__doc__ = "%s ( %s ) > %s" % ( tool.name, tool.id, testdef.name ) d['test_tool_%06d' % j] = m G[ n ] = new.classobj( n, s, d ) +
participants (1)
-
Greg Von Kuster