blob: 59ff56050b020c5bda41fe462b9ddd014819907b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
from __future__ import print_function, unicode_literals
from wee_slack import SlackTS
def test_process_reply(realish_eventrouter, team, channel_general):
message_ts = SlackTS('12341234.123456')
message_text = 'reply test'
channel_general.send_message(message_text)
team.ws.add({'reply_to': 1, '_team': team.team_hash, 'ts': str(message_ts)})
realish_eventrouter.receive_ws_callback(team.team_hash, None)
realish_eventrouter.handle_next()
assert message_ts in channel_general.messages
message_json = channel_general.messages[message_ts].message_json
assert message_json['ts'] == message_ts
assert message_json['text'] == message_text
|