diff options
author | Ryan Huber <rhuber@gmail.com> | 2017-02-01 11:58:13 -0800 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2017-02-01 11:58:13 -0800 |
commit | 681dbc193bae47429662a9504d75768ab1fdda4c (patch) | |
tree | dda3b3f9b180e93d5365fe8c7d4ea6b07ae2e8a2 /_pytest/test_processreply.py | |
parent | e63a037a323221e24ba0f422d8d81ee77f0b3ce0 (diff) | |
download | wee-slack-681dbc193bae47429662a9504d75768ab1fdda4c.tar.gz |
add first basic tests
Diffstat (limited to '_pytest/test_processreply.py')
-rw-r--r-- | _pytest/test_processreply.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/_pytest/test_processreply.py b/_pytest/test_processreply.py new file mode 100644 index 0000000..a725f23 --- /dev/null +++ b/_pytest/test_processreply.py @@ -0,0 +1,33 @@ +#from wee_slack import process_reply + +def test_process_reply(monkeypatch, realish_eventrouter, mock_websocket): + + e = realish_eventrouter + + t = e.teams.keys()[0] + #u = e.teams[t].users.keys()[0] + + #user = e.teams[t].users[u] + #print user + + socket = mock_websocket + e.teams[t].ws = socket + + c = e.teams[t].channels.keys()[0] + channel = e.teams[t].channels[c] + channel.send_message('asdf') + + socket = mock_websocket + socket.add({"reply_to": 1, "_team": t, "ts": "12341234.111"}) + + print e.teams[t].ws_replies + + e.receive_ws_callback(t) + e.handle_next() + + #reply = {"reply_to": 1, "_team": t, "ts": "12341234.111"} + #print reply + #process_reply(reply, e) + #print e.teams[t].ws_replies + #assert False + pass |