#NEWLINE# def test_invalid_reset_password( client ) : #NEWLINE# #INDENT# print ( 'test_invalid_reset_password' ) #NEWLINE# um = current_app . user_manager #NEWLINE# new_password = 'Password5' #NEWLINE# user1 . reset_password_token = um . generate_token ( user1 . id ) #NEWLINE# token = user1 . reset_password_token #NEWLINE# url = url_for ( 'user.reset_password' , token = 'InvalidToken' ) #NEWLINE# client . post_invalid_form ( url , 'Your reset password token is invalid' , new_password = new_password , retype_password = new_password ) #NEWLINE# url = url_for ( 'user.reset_password' , token = token ) #NEWLINE# um . reset_password_expiration = 1 #NEWLINE# time . sleep ( 2 ) #NEWLINE# client . post_invalid_form ( url , 'Your reset password token has expired' , new_password = new_password , retype_password = new_password ) #NEWLINE# um . reset_password_expiration = ( ( 2 * 24 ) * 3600 ) #NEWLINE# client . post_invalid_form ( url , 'New Password and Retype Password did not match' , new_password = new_password , retype_password = 'XPassword5' )