#NEWLINE# def test_group_is_not_deleted( self ) : #NEWLINE# #INDENT# 'Test when a user does not confirm they want to delete a group.' #NEWLINE# user = self . create_superuser ( ) #NEWLINE# self . client . login ( username = user . email , password = 'moo' ) #NEWLINE# group = Group . objects . create ( name = 'please do not delete me' ) #NEWLINE# response = self . client . post ( reverse ( 'delete_group' , kwargs = { #NEWLINE# #INDENT# 'pk' : group . pk , #NEWLINE# #UNINDENT# } ) , { #NEWLINE# #INDENT# 'are_you_sure' : 'no' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertRedirects ( response , reverse ( 'group_details' , kwargs = { #NEWLINE# #INDENT# 'pk' : group . pk , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# group = Group . objects . get ( pk = group . pk ) #NEWLINE# self . assertEqual ( group . status , 'active' )