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)
def test_handle_message_ignores_slackbot(): client = FakeClient() event = {"user": "******"} eq_(slask.handle_message(client, event, None, None), None)
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)