def test_parse_slack_message_returns_user_from_message(): #arrange fake_message = [{'text': 'test 123', 'channel': 'foo', 'user': '******'}] k = Kairo("app") #act message, channel, user = k.parse_slack_message(fake_message) #assert assert 'bar' == user
def test_parse_slack_message_with_none_passed_returns_none_tuple(): k = Kairo("app") command, channel, user = k.parse_slack_message(None) assert command is None assert channel is None assert user is None