1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/4a6cd1da30d0/ Changeset: 4a6cd1da30d0 User: davebgx Date: 2014-04-28 17:22:17 Summary: Twill test framework cleanup. Update install and test methods to reflect changes in base twilltestcase.py. Affected #: 2 files
diff -r fe0df2e688999aa7e0087cbb95c0a7257e9ae6d2 -r 4a6cd1da30d0c4e3f8e0ed7b1c1e6342bed20e44 test/base/twilltestcase.py --- a/test/base/twilltestcase.py +++ b/test/base/twilltestcase.py @@ -1769,10 +1769,11 @@ tc.submit( "edit_external_service_button" ) for check_str in strings_displayed_after_submit: self.check_page_for_string( check_str ) + # Sample tracking stuff def check_request_grid( self, cntrller, state, deleted=False, strings_displayed=[] ): - self.visit_url( '%s/%s/browse_requests?sort=create_time&f-state=%s&f-deleted=%s' % \ - ( self.url, cntrller, state.replace( ' ', '+' ), str( deleted ) ) ) + params = { 'f-state': state, 'f-deleted': deleted, 'sort': 'create_time' } + self.visit_url( '/%s/browse_requests' % cntrller ) for check_str in strings_displayed: self.check_page_for_string( check_str ) def create_request_type( self, name, desc, request_form_id, sample_form_id, states, strings_displayed=[], strings_displayed_after_submit=[] ): @@ -1967,8 +1968,8 @@ for check_str in strings_displayed: self.check_page_for_string( check_str ) for sample_id in sample_ids: - tc.fv( "1", "select_sample_%i" % sample_id, True ) - tc.fv( "1", "sample_operation", 'Select data library and folder' ) + tc.fv( "edit_samples", "select_sample_%i" % sample_id, True ) + tc.fv( "edit_samples", "sample_operation", 'Select data library and folder' ) # refresh on change to show the data libraries selectfield self.refresh_form( "sample_operation", 'Select data library and folder' ) self.check_page_for_string( "Select data library:" )
diff -r fe0df2e688999aa7e0087cbb95c0a7257e9ae6d2 -r 4a6cd1da30d0c4e3f8e0ed7b1c1e6342bed20e44 test/install_and_test_tool_shed_repositories/base/twilltestcase.py --- a/test/install_and_test_tool_shed_repositories/base/twilltestcase.py +++ b/test/install_and_test_tool_shed_repositories/base/twilltestcase.py @@ -3,7 +3,6 @@ import re import test_db_util import time -import urllib
import galaxy.model as model import galaxy.model.tool_shed_install as install_model @@ -72,22 +71,22 @@ encoded_repository_id = repository_info_dict[ 'repository_id' ] tool_shed_url = repository_info_dict[ 'tool_shed_url' ] # Pass galaxy_url to the tool shed in order to set cookies and redirects correctly. - install_params = urllib.urlencode( dict( repository_ids=encoded_repository_id, - changeset_revisions=changeset_revision, - galaxy_url=self.url ) ) + install_params = dict( repository_ids=encoded_repository_id, + changeset_revisions=changeset_revision, + galaxy_url=self.url ) # If the tool shed does not have the same hostname as the Galaxy server being used for these tests, # twill will not carry over previously set cookies for the Galaxy server when following the # install_repositories_by_revision redirect, so we have to include 403 in the allowed HTTP # status codes and log in again. - url = '%s/repository/install_repositories_by_revision?%s' % ( tool_shed_url, install_params ) - self.visit_url( url, allowed_codes=[ 200, 403 ] ) + url = '%s/repository/install_repositories_by_revision' % tool_shed_url + self.visit_url( url, params=install_params, allowed_codes=[ 200, 403 ] ) self.logout() self.login( email='test@bx.psu.edu', username='test' ) - install_params = urllib.urlencode( dict( repository_ids=encoded_repository_id, - changeset_revisions=changeset_revision, - tool_shed_url=tool_shed_url ) ) - url = '/admin_toolshed/prepare_for_install?%s' % install_params - self.visit_url( url ) + install_params = dict( repository_ids=encoded_repository_id, + changeset_revisions=changeset_revision, + tool_shed_url=tool_shed_url ) + url = '/admin_toolshed/prepare_for_install' + self.visit_url( url, params=install_params ) # This section is tricky, due to the way twill handles form submission. The tool dependency checkbox needs to # be hacked in through tc.browser, putting the form field in kwd doesn't work. form = tc.browser.get_form( 'select_tool_panel_section' ) @@ -124,13 +123,6 @@ del( kwd[ field_name ] ) return kwd
- def visit_url( self, url, allowed_codes=[ 200 ] ): - new_url = tc.go( url ) - return_code = tc.browser.get_code() - assert return_code in allowed_codes, 'Invalid HTTP return code %s, allowed codes: %s' % \ - ( return_code, ', '.join( str( code ) for code in allowed_codes ) ) - return new_url - def wait_for_repository_installation( self, repository_ids ): final_states = [ install_model.ToolShedRepository.installation_status.ERROR, install_model.ToolShedRepository.installation_status.INSTALLED ]
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.