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.
This commit is contained in:
Prakhar Pratyush 2023-08-02 22:59:29 +05:30 committed by Tim Abbott
parent d7d7828a12
commit bdbd405328
1 changed files with 7 additions and 1 deletions

View File

@ -827,7 +827,13 @@ class MissedMessageHookTest(ZulipTestCase):
) )
def test_followed_topic_email_and_push_notify(self) -> None: 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( do_set_user_topic_visibility_policy(
self.user_profile, self.user_profile,
get_stream("Denmark", self.user_profile.realm), get_stream("Denmark", self.user_profile.realm),