test_events: Separate tests for send and update message events.

This is a prep commit to separate the single test
'test_stream_send_message_events' into two separate tests named
'test_stream_send_message_events' & test_stream_update_message_events'
to verify the events related to send and update message, respectively.

As a part of introducing two new user settings
* 'automatically_follow_topics_policy'
* 'automatically_unmute_topics_policy'
in the next commit, we will extend 'test_stream_send_message_events'.

This logical separation helps in avoiding a single, super-long test.
This commit is contained in:
Prakhar Pratyush 2023-09-14 14:05:26 +05:30 committed by Tim Abbott
parent cf804200c7
commit db8229ae32
1 changed files with 3 additions and 0 deletions

View File

@ -550,6 +550,9 @@ class NormalActionsTest(BaseAction):
check_message("events[0]", events[0])
assert events[0]["message"]["avatar_url"] is None
def test_stream_update_message_events(self) -> None:
self.send_stream_message(self.example_user("hamlet"), "Verona", "hello")
# Verify stream message editing - content only
message = Message.objects.order_by("-id")[0]
content = "new content"