[hg] galaxy 1612: Fixes for testing framework to allow it to be ...
details: http://www.bx.psu.edu/hg/galaxy/rev/3385fbd2af47 changeset: 1612:3385fbd2af47 user: Dan Blankenberg <dan@bx.psu.edu> date: Fri Nov 07 15:39:47 2008 -0500 description: Fixes for testing framework to allow it to be run against an external server. 2 file(s) affected in this change: test/base/twilltestcase.py test/functional/__init__.py diffs (63 lines): diff -r c7bc4de93fbb -r 3385fbd2af47 test/base/twilltestcase.py --- a/test/base/twilltestcase.py Thu Nov 06 09:44:19 2008 -0500 +++ b/test/base/twilltestcase.py Fri Nov 07 15:39:47 2008 -0500 @@ -7,6 +7,7 @@ import twill import twill.commands as tc from twill.other_packages._mechanize_dist import ClientForm +pkg_resources.require( "elementtree" ) from elementtree import ElementTree buffer = StringIO.StringIO() @@ -255,7 +256,7 @@ self.assertTrue( data_list ) if hid is None: # take last hid elem = data_list[-1] - hid = elem.get('hid') + hid = int( elem.get('hid') ) self.assertTrue( hid ) self.visit_page( 'edit?hid=%d' % hid ) if form_no == 0: @@ -510,6 +511,21 @@ tc.find( 'runtool_btn' ) self.submit_form( **kwd ) + def run_ucsc_main( self, track_params, output_params ): + """Gets Data From UCSC""" + tool_id = "ucsc_table_direct1" + track_string = urllib.urlencode( track_params ) + galaxy_url = urllib.quote_plus( "%s/tool_runner/index?" % self.url ) + + self.visit_url( "http://genome.ucsc.edu/cgi-bin/hgTables?GALAXY_URL=%s&hgta_compressType=none&tool_id=%s&%s" % ( galaxy_url, tool_id, track_string ) ) + tc.fv( "1","hgta_doTopSubmit", "get output" ) + self.submit_form( button="get output" )#, **track_params ) + + + tc.fv( "1","hgta_doGalaxyQuery", "Send query to Galaxy" ) + + self.submit_form( button="Send query to Galaxy" )#, **output_params ) #AssertionError: Attempting to set field 'fbQual' to value '['whole']' in form 'None' threw exception: no matching forms! control: <RadioControl(fbQual=[whole, upstreamAll, endAll])> + def wait( self, maxiter=20 ): """Waits for the tools to finish""" count = 0 diff -r c7bc4de93fbb -r 3385fbd2af47 test/functional/__init__.py --- a/test/functional/__init__.py Thu Nov 06 09:44:19 2008 -0500 +++ b/test/functional/__init__.py Fri Nov 07 15:39:47 2008 -0500 @@ -16,6 +16,7 @@ from galaxy.web import buildapp import test_toolbox from galaxy import tools +from galaxy.util import bunch log = logging.getLogger( __name__ ) @@ -92,7 +93,8 @@ else: # FIXME: This doesn't work at all now that toolbox requires an 'app' instance # (to get at datatypes, might just pass a datatype registry directly) - test_toolbox.toolbox = tools.ToolBox( 'tool_conf.xml.test', 'tools' ) + my_app = bunch.Bunch( datatypes_registry = galaxy.datatypes.registry.Registry() ) + test_toolbox.toolbox = tools.ToolBox( 'tool_conf.xml.test', 'tools', my_app ) # Test if the server is up conn = httplib.HTTPConnection( galaxy_test_host, galaxy_test_port )
participants (1)
-
Nate Coraor