From db8229ae32475ec9d114d04a35a50c5096d27f2e Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Thu, 14 Sep 2023 14:05:26 +0530 Subject: [PATCH] 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. --- zerver/tests/test_events.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py index 6adfd6446a..a275c8c6d4 100644 --- a/zerver/tests/test_events.py +++ b/zerver/tests/test_events.py @@ -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"