fixed forms and user_info functional tests

removed a debugging print stmt
This commit is contained in:
Ramkrishna Chakrabarty
2010-04-13 10:16:46 -04:00
parent 1e4a83ac22
commit 5fb95b2d8b
4 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -1326,7 +1326,7 @@ class FormDefinition( object ):
# 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:
-1
View File
@@ -541,7 +541,6 @@ class Forms( BaseController ):
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)
+4 -4
View File
@@ -106,7 +106,7 @@ class TestFormsAndRequests( TwillTestCase ):
"""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 @@ class TestFormsAndRequests( TwillTestCase ):
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 @@ class TestFormsAndRequests( TwillTestCase ):
"""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 @@ class TestFormsAndRequests( TwillTestCase ):
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'" \
+1 -1
View File
@@ -162,7 +162,7 @@ class TestUserInfo( TwillTestCase ):
# 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',