#NEWLINE# def test_form_valid_not_confirmed( self ) : #NEWLINE# #INDENT# 'Test that a user is not banned when confirm=False' #NEWLINE# user = mommy . make ( 'accounts.User' , is_banned = True ) #NEWLINE# self . assertTrue ( user . is_banned ) #NEWLINE# response = self . client . post ( reverse ( 'unban_user' , kwargs = { #NEWLINE# #INDENT# 'user_uuid' : user . uuid , #NEWLINE# #UNINDENT# } ) , { #NEWLINE# #INDENT# 'user' : user . pk , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertRedirects ( response , reverse ( 'user_details' , kwargs = { #NEWLINE# #INDENT# 'user_uuid' : user . uuid , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# user = User . objects . get ( pk = user . pk ) #NEWLINE# self . assertTrue ( user . is_banned )