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.
This commit is contained in:
sahil839 2021-05-02 12:39:30 +05:30 committed by Tim Abbott
parent e4f85383f6
commit 141232749b
1 changed files with 2 additions and 2 deletions

View File

@ -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(