mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 19:06:09 +00:00
tests: Clean up and extend topic links tests in test_messages.
This is a follow-up to b69213808a.
We now actually send messages from the notification_bot, which
is the real usecase for this code.
Also, this cleans up the code and removes needless asserts like
`assertNotEqual(zulip_realm, lear_realm)` making the test easier
to read.
This commit is contained in:
committed by
Tim Abbott
parent
2504d9ffc9
commit
5fd0a121ea
@@ -2046,9 +2046,9 @@ def extract_emails(emails: Iterable[str]) -> List[str]:
|
||||
return recipients
|
||||
|
||||
def check_send_stream_message(sender: UserProfile, client: Client, stream_name: str,
|
||||
topic: str, body: str) -> int:
|
||||
topic: str, body: str, realm: Optional[Realm]=None) -> int:
|
||||
addressee = Addressee.for_stream_name(stream_name, topic)
|
||||
message = check_message(sender, client, addressee, body)
|
||||
message = check_message(sender, client, addressee, body, realm)
|
||||
|
||||
return do_send_messages([message])[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user