From bdbd405328fbcfc3f2dd0ebb07386cf187b0baef Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Wed, 2 Aug 2023 22:59:29 +0530 Subject: [PATCH] test_event_queue: Set the notification settings explicitly. This commit explicitly sets the following user settings: * 'enable_followed_topic_email_notifications' * 'enable_followed_topic_push_notifications' to True. Collectively, this improves the readability of the test and the following two tests. --- zerver/tests/test_event_queue.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zerver/tests/test_event_queue.py b/zerver/tests/test_event_queue.py index 4633a6a7ff..8359bcf4a8 100644 --- a/zerver/tests/test_event_queue.py +++ b/zerver/tests/test_event_queue.py @@ -827,7 +827,13 @@ class MissedMessageHookTest(ZulipTestCase): ) def test_followed_topic_email_and_push_notify(self) -> None: - # By default, messages sent in followed topics should send notifications. + # messages sent in followed topics should send both email and push notifications. + do_change_user_setting( + self.user_profile, "enable_followed_topic_email_notifications", True, acting_user=None + ) + do_change_user_setting( + self.user_profile, "enable_followed_topic_push_notifications", True, acting_user=None + ) do_set_user_topic_visibility_policy( self.user_profile, get_stream("Denmark", self.user_profile.realm),