[hg] galaxy 3631: fixed forms and user_info functional tests
details: http://www.bx.psu.edu/hg/galaxy/rev/968161f35d50 changeset: 3631:968161f35d50 user: rc date: Tue Apr 13 10:16:46 2010 -0400 description: fixed forms and user_info functional tests removed a debugging print stmt diffstat: lib/galaxy/model/__init__.py | 2 +- lib/galaxy/web/controllers/forms.py | 1 - test/functional/test_forms_and_requests.py | 8 ++++---- test/functional/test_user_info.py | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diffs (74 lines): diff -r fdf5c92e7fae -r 968161f35d50 lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py Mon Apr 12 19:11:36 2010 -0400 +++ b/lib/galaxy/model/__init__.py Tue Apr 13 10:16:46 2010 -0400 @@ -1326,7 +1326,7 @@ # the user had already filled out this field and the same form is re-rendered # due to some reason like required fields have been left out. if field[ 'type' ] == 'CheckboxField': - value = CheckboxField.is_checked( util.restore_text( params.get( field_name, False ) ) ) + value = CheckboxField.is_checked( params.get( field_name, False ) ) else: value = util.restore_text( params.get( field_name, '' ) ) elif contents: diff -r fdf5c92e7fae -r 968161f35d50 lib/galaxy/web/controllers/forms.py --- a/lib/galaxy/web/controllers/forms.py Mon Apr 12 19:11:36 2010 -0400 +++ b/lib/galaxy/web/controllers/forms.py Tue Apr 13 10:16:46 2010 -0400 @@ -541,7 +541,6 @@ self.selectbox_options = [] # if the form is for defining samples, then use the sample field types # which does not include TextArea & AddressField - print >> sys.stderr, 'form_type', form_type if form_type == trans.app.model.FormDefinition.types.SAMPLE: for ft in BaseField.sample_field_types(): self.fieldtype.add_option(ft, ft) diff -r fdf5c92e7fae -r 968161f35d50 test/functional/test_forms_and_requests.py --- a/test/functional/test_forms_and_requests.py Mon Apr 12 19:11:36 2010 -0400 +++ b/test/functional/test_forms_and_requests.py Tue Apr 13 10:16:46 2010 -0400 @@ -106,7 +106,7 @@ """Testing address & library creation""" # first create a regular user self.logout() - self.login( email='test1@bx.psu.edu' ) + self.login( email='test1@bx.psu.edu', username='regular-user1' ) self.logout() self.login( email='test@bx.psu.edu' ) # first create a library for the request so that it can be submitted later @@ -191,7 +191,7 @@ self.check_page_for_string( name ) # create address self.logout() - self.login( email='test1@bx.psu.edu' ) + self.login( email='test1@bx.psu.edu', username='regular-user1' ) self.add_user_address( regular_user1.id, address1 ) global regular_user regular_user = sa_session.query( galaxy.model.User ) \ @@ -206,7 +206,7 @@ """Testing creating, editing and submitting a request as a regular user""" # login as a regular user self.logout() - self.login( email='test1@bx.psu.edu' ) + self.login( email='test1@bx.psu.edu', username='regular-user1' ) # set field values fields = ['option1', str(user_address.id), 'field three value'] # create the request @@ -259,7 +259,7 @@ self.home() sa_session.refresh( request_one ) self.logout() - self.login( email='test1@bx.psu.edu' ) + self.login( email='test1@bx.psu.edu', username='regular-user1' ) # check if the request's state is now set to 'complete' self.check_request_grid(state='Complete', request_name=request_one.name) assert request_one.state is not request_one.states.COMPLETE, "The state of the request '%s' should be set to '%s'" \ diff -r fdf5c92e7fae -r 968161f35d50 test/functional/test_user_info.py --- a/test/functional/test_user_info.py Mon Apr 12 19:11:36 2010 -0400 +++ b/test/functional/test_user_info.py Tue Apr 13 10:16:46 2010 -0400 @@ -162,7 +162,7 @@ # Test changing email and user name - first try an invalid user name self.edit_login_info( new_email='test12_new@bx.psu.edu', new_username='test12_new', - check_str1='User name must contain only letters, numbers and' ) + check_str1="User name must contain only lower-case letters, numbers and '-'" ) # Now try a valid user name self.edit_login_info( new_email='test12_new@bx.psu.edu', new_username='test12-new',
participants (1)
-
Greg Von Kuster