diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2022-01-30 15:17:20 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2022-09-17 18:56:26 +0200 |
commit | ac32fc7c758ebec594bf774c5b991cf544242c13 (patch) | |
tree | 80fba8c4641403b2f28bd431f7c9d6652d99a6bc /_pytest/conftest.py | |
parent | ecafb3bfccc37a56f718b89c8820cbf09015a48d (diff) | |
download | wee-slack-ac32fc7c758ebec594bf774c5b991cf544242c13.tar.gz |
Support starting wee-slack without using rtm.start
rtm.start is deprecated and will stop working on September 20, 2022.
This patch replaces it with several other API endpoints to get the info
we need.
The handle_rtmstart method is kept for the test setup to work, but this
setup should also be replaced with the new API endpoints.
This is a necessary step for #699 and #844
Diffstat (limited to '_pytest/conftest.py')
-rw-r--r-- | _pytest/conftest.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/_pytest/conftest.py b/_pytest/conftest.py index 733ca77..af86b02 100644 --- a/_pytest/conftest.py +++ b/_pytest/conftest.py @@ -12,7 +12,7 @@ from websocket import ABNF sys.path.append(".") import wee_slack # noqa: E402 -from wee_slack import EventRouter, initiate_connection # noqa: E402 +from wee_slack import EventRouter, SlackRequest # noqa: E402 class fakewebsocket(object): @@ -45,7 +45,7 @@ def mock_websocket(): def realish_eventrouter(mock_websocket, mock_weechat): e = EventRouter() wee_slack.EVENTROUTER = e - context = e.store_context(initiate_connection("xoxs-token")) + context = e.store_context(SlackRequest(None, "rtm.start", token="xoxs-token")) with open("_pytest/data/http/rtm.start.json") as rtmstartfile: if sys.version_info.major == 2: rtmstartdata = rtmstartfile.read().decode("utf-8") |