'Test that authenticate events are successfully opted out.'

def test_opt_out_authenticate_event(self):

    resource_type = EXP_RESOURCE_TYPE
    action = ((CREATED_OPERATION + '.') + resource_type)
    initiator = mock
    target = mock
    outcome = 'success'
    event_type = 'identity.authenticate'
    meter_name = ('%s.%s' % (event_type, outcome))
    conf = self.useFixture(config_fixture.Config(CONF))
    conf.config(notification_opt_out=[meter_name])
    with mock.patch.object(notifications._get_notifier(), '_notify') as mocked:
        notifications._send_audit_notification(action, initiator, outcome, target, event_type)
        mocked.assert_not_called()
