#NEWLINE# @ patch . object ( acl , 'parse_permissions' ) #NEWLINE# def test_apply_callables_principal_returns_none( self , mock_meth ) : #NEWLINE# #INDENT# mock_meth . return_value = '123' #NEWLINE# principal = Mock ( return_value = None ) #NEWLINE# obj = acl . BaseACL ( 'req' ) #NEWLINE# new_acl = obj . _apply_callables ( acl = [ ( 'foo' , principal , 'bar' ) ] , obj = 'obj' ) #NEWLINE# assert ( new_acl == ( ) ) #NEWLINE# principal . assert_called_once_with ( ace = ( 'foo' , principal , 'bar' ) , request = 'req' , obj = 'obj' ) #NEWLINE# assert ( not mock_meth . called )