aboutsummaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-10-21 23:31:00 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:54 +0100
commitcfbe97d9a476eb543498ad13547a023ace23dd17 (patch)
treee5ae9178adf185897fb82a78522182cecda32a05 /tests/conftest.py
parent9e99c1d54eec2ab49a1a6a749bec1def8d182927 (diff)
downloadwee-slack-cfbe97d9a476eb543498ad13547a023ace23dd17.tar.gz
Make conversations.name not async
This means a lot of methods don't have to be async. It's especially useful for the next commit adding conversations completions.
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 0b3cada..954de87 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -163,10 +163,13 @@ def workspace():
w.my_user = user_test1
w.users[user_test1_id] = user_test1_future
- channel_public = SlackConversation(w, channel_public_info)
channel_public_future = Future[SlackConversation]()
- channel_public_future.set_result(channel_public)
w.conversations[channel_public_id] = channel_public_future
+ channel_public = SlackConversation.create_from_info(w, channel_public_info)
+ try:
+ channel_public.send(None)
+ except StopIteration as e:
+ channel_public_future.set_result(e.value)
return w