From 141232749be56822dea995c6a2e77bf6880f7a9a Mon Sep 17 00:00:00 2001 From: sahil839 Date: Sun, 2 May 2021 12:39:30 +0530 Subject: [PATCH] test_message_send: Modify test_wildcard_mention_restrictions. This commit modifies the test_wildcard_mention_restrictions test for checking that moderators are not allowed to send messages with wildcard mention if wildcard_mention_policy is set to WILDCARD_MENTION_POLICY_ADMINS. Previously, we were checking for members, but it is better to check for moderators. --- zerver/tests/test_message_send.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/tests/test_message_send.py b/zerver/tests/test_message_send.py index 6b1efa3984..203dc7d138 100644 --- a/zerver/tests/test_message_send.py +++ b/zerver/tests/test_message_send.py @@ -1832,9 +1832,9 @@ class StreamMessagesTest(ZulipTestCase): do_set_realm_property( realm, "wildcard_mention_policy", Realm.WILDCARD_MENTION_POLICY_ADMINS, acting_user=None ) - self.send_and_verify_wildcard_mention_message("cordelia", test_fails=True) + self.send_and_verify_wildcard_mention_message("shiva", test_fails=True) # There is no restriction on small streams. - self.send_and_verify_wildcard_mention_message("cordelia", sub_count=10) + self.send_and_verify_wildcard_mention_message("shiva", sub_count=10) self.send_and_verify_wildcard_mention_message("iago") do_set_realm_property(