# Path: will/backends/io_adapters/slack.py
# MAX_MESSAGE_SIZE = 4031
#     PAGE_LIMIT = 1000
# class SlackMarkdownConverter(MarkdownConverter):
# class SlackBackend(
#     IOBackend, SleepMixin, StorageMixin
# ):  # pylint: disable=too-many-instance-attributes
#     def convert_strong(self, _, text):  # pylint: disable=no-self-use
#     def convert_a(self, el, text):
#     def get_channel_from_name(self, name):
#     def get_channel_name_from_id(self, name):
#     def normalize_incoming_event(self, event):
#     def set_topic(self, event):
#     def send_file(self, event):
#     def handle_outgoing_event(self, event, retry=5):
#     def set_data_channel_and_thread(event, data=None):
#     def get_event_data(self, event):
#     def send_message(self, event):
#     def open_direct_message(self, user_id):
#     def update_message(self, event):
#     def _map_color(color):
#     def join_channel(self, channel_id):
#     def people(self):
#     def default_channel(self):
#     def channels(self):
#     def client(self):
#     def _decide_default_channel(self):
#     def _update_channels(self, client=None):
#     def _update_people(self, client=None):
#     def _update_backend_metadata(self, **event):
#     def _watch_slack_rtm(self):
#     def handle_incoming_slack_event(self, **kwargs):
#     def bootstrap(self):
#     def terminate(self):


from will.backends.io_adapters import slack


class TestSlackMarkdownConverter:
    converter = slack.SlackMarkdownConverter()

    def test_convert_strong_with_text(self):
        slack_strong = self.converter.convert_strong("<b>", "hello")
        assert slack_strong == "*hello*"

    def test_convert_strong_with_empty_text(self):
        slack_strong = self.converter.convert_strong("<b>", "")
        assert slack_strong == ""

    def test_convert_a_with_text(self):
        slack_a = self.converter.convert_a({"href": "https://www.google.com"},
                                           "Google")

# Path: will/backends/io_adapters/slack.py
# MAX_MESSAGE_SIZE = 4031
#     PAGE_LIMIT = 1000
# class SlackMarkdownConverter(MarkdownConverter):
# class SlackBackend(
#     IOBackend, SleepMixin, StorageMixin
# ):  # pylint: disable=too-many-instance-attributes
#     def convert_strong(self, _, text):  # pylint: disable=no-self-use
#     def convert_a(self, el, text):
#     def get_channel_from_name(self, name):
#     def get_channel_name_from_id(self, name):
#     def normalize_incoming_event(self, event):
#     def set_topic(self, event):
#     def send_file(self, event):
#     def handle_outgoing_event(self, event, retry=5):
#     def set_data_channel_and_thread(event, data=None):
#     def get_event_data(self, event):
#     def send_message(self, event):
#     def open_direct_message(self, user_id):
#     def update_message(self, event):
#     def _map_color(color):
#     def join_channel(self, channel_id):
#     def people(self):
#     def default_channel(self):
#     def channels(self):
#     def client(self):
#     def _decide_default_channel(self):
#     def _update_channels(self, client=None):
#     def _update_people(self, client=None):
#     def _update_backend_metadata(self, **event):
#     def _watch_slack_rtm(self):
#     def handle_incoming_slack_event(self, **kwargs):
#     def bootstrap(self):
#     def terminate(self):


# Path: will/tests/backends/io_adapters/test_slack.py
from will.backends.io_adapters import slack



class TestSlackMarkdownConverter:
    converter = slack.SlackMarkdownConverter()

    def test_convert_strong_with_text(self):
        slack_strong = self.converter.convert_strong("<b>", "hello")
        assert slack_strong == "*hello*"

    def test_convert_strong_with_empty_text(self):
        slack_strong = self.converter.convert_strong("<b>", "")
        assert slack_strong == ""

    def test_convert_a_with_text(self):
        slack_a = self.converter.convert_a({"href": "https://www.google.com"},
                                           "Google")

        assert slack_a == "<https://www.google.com|Google>"