Fix user tests.

This commit is contained in:
Nate Coraor
2010-07-01 10:43:40 -04:00
parent 6ef3645b33
commit f302830150
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
%endif
<div class="toolForm">
<div class="toolFormTitle">Login</div>
<div class="toolFormTitle">Reset Password</div>
<form name="reset_password" id="reset_password" action="${h.url_for( controller='user', action='reset_password' )}" method="post" >
<div class="form-row">
<label>Email:</label>
+2 -2
View File
@@ -69,7 +69,7 @@ ${render_user_info()}
<p/>
<div class="toolForm">
<form name="user_info" id="user_info" action="${h.url_for( controller='user', action='new_address', user_id=user.id, admin_view=admin_view )}" method="post" >
<form name="user_addresses" id="user_addresses" action="${h.url_for( controller='user', action='new_address', user_id=user.id, admin_view=admin_view )}" method="post" >
<div class="toolFormTitle">User Addresses</div>
<div class="toolFormBody">
%if user.addresses:
@@ -125,7 +125,7 @@ ${render_user_info()}
%if trans.app.config.enable_api:
<div class="toolForm">
<form name="user_info" id="user_info" action="${h.url_for( controller='user', action='new_api_key', user_id=user.id, admin_view=admin_view )}" method="post" >
<form name="user_api_keys" id="user_api_keys" action="${h.url_for( controller='user', action='new_api_key', user_id=user.id, admin_view=admin_view )}" method="post" >
<div class="toolFormTitle">Web API Key</div>
<div class="toolFormBody">
<div class="form-row">
+6 -6
View File
@@ -824,8 +824,8 @@ class TwillTestCase( unittest.TestCase ):
self.home()
self.visit_url( "%s/user/show_info" % self.url )
self.check_page_for_string( "Manage User Information" )
tc.fv( "1", "email", new_email )
tc.fv( "1", "username", new_username )
tc.fv( "login_info", "email", new_email )
tc.fv( "login_info", "username", new_username )
tc.submit( "login_info_button" )
if check_str1:
self.check_page_for_string( check_str1 )
@@ -833,9 +833,9 @@ class TwillTestCase( unittest.TestCase ):
self.home()
self.visit_page( "user/show_info" )
self.check_page_for_string( "Manage User Information" )
tc.fv( "2", "current", password )
tc.fv( "2", "password", new_password )
tc.fv( "2", "confirm", new_password )
tc.fv( "change_password", "current", password )
tc.fv( "change_password", "password", new_password )
tc.fv( "change_password", "confirm", new_password )
tc.submit( "change_password_button" )
self.check_page_for_string( 'The password has been changed.' )
def edit_user_info( self, info_values ):
@@ -843,7 +843,7 @@ class TwillTestCase( unittest.TestCase ):
self.visit_page( "user/show_info" )
self.check_page_for_string( "Manage User Information" )
for index, info_value in enumerate(info_values):
tc.fv( "3", "field_%i" % index, info_value )
tc.fv( "user_info", "field_%i" % index, info_value )
tc.submit( "edit_user_info_button" )
self.check_page_for_string( "The user information has been updated with the changes." )
for value in info_values: