#NEWLINE# def test_make_user_with_perms( self ) : #NEWLINE# #INDENT# u1 = self . make_user ( 'u1' , perms = [ 'auth.*' ] ) #NEWLINE# expected_perms = [ 'add_group' , 'change_group' , 'delete_group' , 'add_permission' , 'change_permission' , 'delete_permission' , 'add_user' , 'change_user' , 'delete_user' ] #NEWLINE# self . assertEqual ( list ( u1 . user_permissions . values_list ( 'codename' , flat = True ) ) , u1 ) #NEWLINE# u2 = self . make_user ( 'u2' , perms = [ 'auth.add_group' ] ) #NEWLINE# self . assertEqual ( list ( u2 . user_permissions . values_list ( 'codename' , flat = True ) ) , [ 'add_group' ] )