From 7d919f3897deb322f13428127b1ba91731917f4c Mon Sep 17 00:00:00 2001 From: Nana Amfo Date: Mon, 8 Apr 2019 06:03:35 -0500 Subject: Add @user-groups support (#680) Add @user-groups with tab-completion. @user-groups will be unfurl into format message before sending message via linktext method. --- _pytest/test_processsubteamcreated.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 _pytest/test_processsubteamcreated.py (limited to '_pytest/test_processsubteamcreated.py') diff --git a/_pytest/test_processsubteamcreated.py b/_pytest/test_processsubteamcreated.py new file mode 100644 index 0000000..7d403db --- /dev/null +++ b/_pytest/test_processsubteamcreated.py @@ -0,0 +1,22 @@ +import glob +import json + +def test_process_subteam_created(mock_websocket, realish_eventrouter): + + eventrouter = realish_eventrouter + + t = eventrouter.teams.keys()[0] + + assert len(eventrouter.teams[t].subteams) == 1 + + socket = mock_websocket + eventrouter.teams[t].ws = socket + datafiles = glob.glob("_pytest/data/websocket/1483975206.59-subteam_created.json") + + for fname in datafiles: + data = json.loads(open(fname, 'r').read()) + socket.add(data) + eventrouter.receive_ws_callback(t) + eventrouter.handle_next() + + assert len(eventrouter.teams[t].subteams) == 2 -- cgit