aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/test_sendmessage.py
blob: eb205c1166d11fdd17b2cb6603966056cb0b0d90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from __future__ import print_function, unicode_literals

import json


def test_send_message(realish_eventrouter, team, channel_general):
    message_text = "send message test"
    channel_general.send_message(message_text)

    sent = json.loads(team.ws.sentdata[0])

    assert sent == {
        "text": message_text,
        "type": "message",
        "user": team.myidentifier,
        "channel": channel_general.id,
        "id": 1,
    }