#NEWLINE# def test_deny( self ) : #NEWLINE# #INDENT# self . acl . allow ( 'actived_user' , 'new' , 'comment' ) #NEWLINE# self . acl . deny ( 'manager' , 'new' , 'comment' ) #NEWLINE# roles = [ 'actived_user' , 'writer' ] #NEWLINE# for role in roles : #NEWLINE# #INDENT# self . assertTrue ( self . acl . is_allowed ( role , 'new' , 'comment' ) ) #NEWLINE# #UNINDENT# self . assertTrue ( self . acl . is_any_allowed ( roles , 'new' , 'comment' ) ) #NEWLINE# roles = [ 'manager' , 'editor' ] #NEWLINE# for role in roles : #NEWLINE# #INDENT# self . assertFalse ( self . acl . is_allowed ( role , 'new' , 'comment' ) ) #NEWLINE# #UNINDENT# self . assertFalse ( self . acl . is_any_allowed ( roles , 'new' , 'comment' ) )