def METHOD_NAME(self):
    """Functions to test slack alert handler"""
    # Should raise an exception if no token provided
    with pytest.raises(errors.InvalidAlertHandlerException):
        SlackAlertHandler({'no-slack-token': 'no-token'})
    # Should raise an exception if no channel provided
    with pytest.raises(errors.InvalidAlertHandlerException):
        SlackAlertHandler({'no-slack-channel': '#no-channel'})
    # Should raise an exception if no valid token provided
    with pytest.raises(SlackApiError):
        slack = SlackAlertHandler(
            {'token': 'invalid-token', 'channel': '#my-channel'}
        )
        slack.send('test message')
    # Should send message if valid token and channel provided
    with patch('slack.WebClient.chat_postMessage') as slack_post_message_mock:
        slack_post_message_mock.return_value = []
        slack = SlackAlertHandler(
            {'token': 'valid-token', 'channel': '#my-channel'}
        )
        slack.send('test message')