#NEWLINE# def test_filter_for_obj_permission( self ) : #NEWLINE# #INDENT# '\n        Tests that the filter_for_obj_permission returns a list of all users\n        who own the permission.\n        ' #NEWLINE# obj_permission = ObjectPermission . objects . get_or_create_for_object_or_class ( 'can_read_val' , self . o3 ) [ 0 ] #NEWLINE# permittees = Permittee . objects . filter_for_obj_permission ( obj_permission , can_delegate = False ) #NEWLINE# self . assertEqual ( set ( permittees ) , set ( [ Permittee . objects . get_as_permittee ( obj ) for obj in [ self . su , self . u1 , self . u2 ] ] ) ) #NEWLINE# permittees = Permittee . objects . filter_for_obj_permission ( obj_permission , can_delegate = True ) #NEWLINE# self . assertEqual ( set ( permittees ) , set ( [ Permittee . objects . get_as_permittee ( obj ) for obj in [ self . su , obj . u1 ] ] ) )