#NEWLINE# @ mock . patch ( 'olympia.access.acl.action_allowed' ) #NEWLINE# def test_permission_allowed_correctly( self , action_allowed ) : #NEWLINE# #INDENT# func = decorators . permission_required ( 'Admin' , '%' ) ( self . f ) #NEWLINE# func ( action_allowed . request ) #NEWLINE# action_allowed . assert_called_with ( self . request , 'Admin' , '%' )