#NEWLINE# def test_group_is_added_to_user_principals_on_members_add_with_patch( self ) : #NEWLINE# #INDENT# self . create_group ( 'beers' , 'moderators' , [ 'natim' , 'mat' ] ) #NEWLINE# group_url = '/buckets/beers/groups/moderators' #NEWLINE# group = { #NEWLINE# #INDENT# 'data' : { #NEWLINE# #INDENT# 'members' : [ 'natim' , 'mat' , 'alice' ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . app . patch_json ( group_url , group , headers = self . headers , status = 200 ) #NEWLINE# self . app . get ( '/buckets/beers/groups' , headers = self . headers , status = 200 ) #NEWLINE# self . assertEquals ( self . permission . user_principals ( 'natim' ) , { group_url } ) #NEWLINE# self . assertEquals ( self . permission . user_principals ( 'mat' ) , { group_url } ) #NEWLINE# self . assertEquals ( self . permission . user_principals ( 'alice' ) , { group_url } )