#NEWLINE# def test_user_with_edit_all_perm_can_update_group( self ) : #NEWLINE# #INDENT# 'Users with can_edit_any_group perm should be able to update.' #NEWLINE# group = self . create_group ( ) #NEWLINE# user = self . create_user ( ) #NEWLINE# permission = Permission . objects . get ( codename = 'can_edit_any_group' ) #NEWLINE# user . user_permissions . add ( permission ) #NEWLINE# client = Client ( ) #NEWLINE# client . login ( username = user . email , password = 'moo' ) #NEWLINE# response = client . post ( reverse ( 'update_group' , args = [ group . pk ] ) , { #NEWLINE# #INDENT# 'authgroup_form-name' : 'TGIF' , #NEWLINE# 'group_form-category' : '1' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertRedirects ( response , reverse ( 'group_details' , args = [ group . pk ] ) ) #NEWLINE# group = Group . objects . get ( pk = group . pk ) #NEWLINE# self . assertEqual ( group . group . name , 'TGIF' )