#NEWLINE# def test_admin_principal( self ) : #NEWLINE# #INDENT# " Admin user has the 'admin' principal " #NEWLINE# access = IAccessBackend ( None ) #NEWLINE# access . is_admin = ( lambda x : True ) #NEWLINE# with patch . object ( principals , 'groups' ) as groups : #NEWLINE# #INDENT# groups . return_value = [ 'brotatos' ] #NEWLINE# principals = access . user_principals ( 'abc' ) #NEWLINE# #UNINDENT# self . assertItemsEqual ( principals , [ Everyone , Authenticated , 'admin' , 'group:brotatos' , 'user:abc' ] )