2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/09c44c3db98c/ Changeset: 09c44c3db98c User: davebgx Date: 2014-04-25 16:41:34 Summary: Fix tool shed functional tests for roles and email notifications. Affected #: 1 file diff -r 880974da3ca4d3d76bcf8b11184cb42c4aee95b7 -r 09c44c3db98cef9fa33b8e511e52928dcec5d2f5 test/tool_shed/base/twilltestcase.py --- a/test/tool_shed/base/twilltestcase.py +++ b/test/tool_shed/base/twilltestcase.py @@ -525,7 +525,7 @@ def enable_email_alerts( self, repository, strings_displayed=[], strings_not_displayed=[] ): repository_id = self.security.encode_id( repository.id ) params = dict( operation='Receive email alerts', id=repository_id ) - self.visit_url( '/repository/browse_repositories' ) + self.visit_url( '/repository/browse_repositories', params ) self.check_for_strings( strings_displayed ) def escape_html( self, string, unescape=False ): @@ -796,7 +796,7 @@ self.check_for_strings( strings_displayed, strings_not_displayed ) params = dict( operation='manage users and groups', id=self.security.encode_id( role.id ) ) url = '/admin/roles' - self.visit_url( url ) + self.visit_url( url, params ) strings_displayed = [ common.test_user_1_email, common.test_user_2_email ] self.check_for_strings( strings_displayed, strings_not_displayed ) # As elsewhere, twill limits the possibility of submitting the form, this time due to not executing the javascript https://bitbucket.org/galaxy/galaxy-central/commits/611117ed0a88/ Changeset: 611117ed0a88 User: davebgx Date: 2014-04-25 16:41:53 Summary: Fix functional tests for library templates. Affected #: 2 files diff -r 09c44c3db98cef9fa33b8e511e52928dcec5d2f5 -r 611117ed0a88654c736bc5722016b81874475c95 test/base/twilltestcase.py --- a/test/base/twilltestcase.py +++ b/test/base/twilltestcase.py @@ -2040,16 +2040,13 @@ dis-inherit your template, call the manage_library_template_inheritance() below immediately after you call this method in your test code. Templates added to Requesttype objects are always inherited to samples. """ - if item_type == 'library': - url = "%s/library_common/add_template?cntrller=%s&item_type=%s&form_type=%s&library_id=%s" % \ - ( self.url, cntrller, item_type, form_type, library_id ) - elif item_type == 'folder': - url = "%s/library_common/add_template?cntrller=%s&item_type=%s&form_type=%s&library_id=%s&folder_id=%s" % \ - ( self.url, cntrller, item_type, form_type, library_id, folder_id ) + params = dict( cntrller=cntrller, item_type=item_type, form_type=form_type, library_id=library_id ) + url = "/library_common/add_template" + if item_type == 'folder': + params[ 'folder_id' ] = folder_id elif item_type == 'ldda': - url = "%s/library_common/add_template?cntrller=%s&item_type=%s&form_type=%s&library_id=%s&folder_id=%s&ldda_id=%s" % \ - ( self.url, cntrller, item_type, form_type, library_id, folder_id, ldda_id ) - self.visit_url( url ) + params[ 'ldda_id' ] = ldda_id + self.visit_url( url, params ) self.check_page_for_string ( "Select a template for the" ) self.refresh_form( "form_id", form_id ) # For some unknown reason, twill barfs if the form number ( 1 ) is used in the following diff -r 09c44c3db98cef9fa33b8e511e52928dcec5d2f5 -r 611117ed0a88654c736bc5722016b81874475c95 test/functional/test_library_templates.py --- a/test/functional/test_library_templates.py +++ b/test/functional/test_library_templates.py @@ -72,12 +72,14 @@ # Pass number of options we want in our SelectField num_options = 2 # Create form for library template + strings_displayed_after_submit = [ "The form '%s' has been updated with the changes." % type ] self.create_form( name=type, description=form_desc, form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE, field_type=type, num_options=num_options, - field_name=field_name ) + field_name=field_name, + strings_displayed_after_submit=strings_displayed_after_submit ) # Get all of the new form definitions for later use global AddressField_form AddressField_form = get_form( 'AddressField' ) @@ -145,7 +147,7 @@ # Add a template containing an AddressField to library1 self.add_template( cntrller='library_admin', item_type='library', - form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE.replace( ' ', '+' ), + form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE, form_id=self.security.encode_id( AddressField_form.id ), form_name=AddressField_form.name, library_id=self.security.encode_id( library1.id ) ) @@ -287,7 +289,7 @@ # Add a template containing an CheckboxField to library1 self.add_template( cntrller='library_admin', item_type='library', - form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE.replace( ' ', '+' ), + form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE, form_id=self.security.encode_id( CheckboxField_form.id ), form_name=CheckboxField_form.name, library_id=self.security.encode_id( library2.id ) ) @@ -363,7 +365,7 @@ # Logged in as admin_user self.add_template( cntrller='library_admin', item_type='library', - form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE.replace( ' ', '+' ), + form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE, form_id=self.security.encode_id( SelectField_form.id ), form_name=SelectField_form.name, library_id=self.security.encode_id( library3.id ) ) @@ -464,7 +466,7 @@ # Add an inheritable template to library4 self.add_template( cntrller='library_admin', item_type='library', - form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE.replace( ' ', '+' ), + form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE, form_id=self.security.encode_id( TextArea_form.id ), form_name=TextArea_form.name, library_id=self.security.encode_id( library4.id ) ) @@ -533,7 +535,7 @@ # Add an inheritable template to library5 self.add_template( cntrller='library_admin', item_type='library', - form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE.replace( ' ', '+' ), + form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE, form_id=self.security.encode_id( TextField_form.id ), form_name=TextField_form.name, library_id=self.security.encode_id( library5.id ) ) @@ -602,7 +604,7 @@ # Currently there is only a TextField, and we'll add a TextArea. self.edit_template( cntrller='library_admin', item_type='library', - form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE.replace( ' ', '+' ), + form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE, library_id=self.security.encode_id( library5.id ), field_type='TextArea', field_label_1=TextArea_form.name, @@ -647,7 +649,7 @@ # We won't select an option since we have no workflow to select self.add_template( cntrller='library_admin', item_type='library', - form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE.replace( ' ', '+' ), + form_type=galaxy.model.FormDefinition.types.LIBRARY_INFO_TEMPLATE, form_id=self.security.encode_id( WorkflowField_form.id ), form_name=WorkflowField_form.name, library_id=self.security.encode_id( library6.id ) ) 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.