mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 10:26:28 +00:00
test_classes: Improve error handling for send_message.
This commit is contained in:
@@ -377,8 +377,10 @@ class ZulipTestCase(TestCase):
|
|||||||
sender = get_user_profile_by_email(sender_name)
|
sender = get_user_profile_by_email(sender_name)
|
||||||
if message_type in [Recipient.PERSONAL, Recipient.HUDDLE]:
|
if message_type in [Recipient.PERSONAL, Recipient.HUDDLE]:
|
||||||
message_type_name = "private"
|
message_type_name = "private"
|
||||||
else:
|
elif message_type == Recipient.STREAM:
|
||||||
message_type_name = "stream"
|
message_type_name = "stream"
|
||||||
|
else:
|
||||||
|
raise AssertionError("Recipient type should be an Recipient.STREAM type enum")
|
||||||
if isinstance(raw_recipients, six.string_types):
|
if isinstance(raw_recipients, six.string_types):
|
||||||
recipient_list = [raw_recipients]
|
recipient_list = [raw_recipients]
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user