Exemple #1
0
def test_handle_message_basic():
    client = FakeClient()

    msg = u"Iñtërnâtiônàlizætiøn"
    event = {"user": "******", "text": msg}

    hooks = slask.init_plugins("test/plugins")
    eq_(slask.handle_message(client, event, hooks, None), msg)
Exemple #2
0
def test_handle_message_ignores_slackbot():
    client = FakeClient()
    event = {"user": "******"}
    eq_(slask.handle_message(client, event, None, None), None)
Exemple #3
0
def test_handle_message_subtype():
    eq_(slask.handle_message(None, {"subtype": "bot_message"}, None, None), None)
    eq_(slask.handle_message(None, {"subtype": "message_changed"}, None, None), None)