From d9fc424e120d2f38287ffe3e5f3857cdb5cd2f01 Mon Sep 17 00:00:00 2001 From: sahil839 Date: Sun, 4 Apr 2021 20:50:27 +0530 Subject: [PATCH] tests: Include moderator role in events and realm update tests. The moderator role was not included in the tests for create_stream_policy and invite_to_stream_policy. The tests are do_set_realm_property_test in test_events.py and do_test_realm_update_api in test_realm.py. This should have been added for create_stream_policy in 5b32dcd and in 5b32dcd for invite_to_stream_policy, but was missed by mistake. --- zerver/tests/test_events.py | 4 ++-- zerver/tests/test_realm.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py index b513db5645..4851060c27 100644 --- a/zerver/tests/test_events.py +++ b/zerver/tests/test_events.py @@ -1860,8 +1860,8 @@ class RealmPropertyActionTest(BaseAction): message_retention_days=[10, 20], name=["Zulip", "New Name"], waiting_period_threshold=[10, 20], - create_stream_policy=[3, 2, 1], - invite_to_stream_policy=[3, 2, 1], + create_stream_policy=[4, 3, 2, 1], + invite_to_stream_policy=[4, 3, 2, 1], private_message_policy=[2, 1], user_group_edit_policy=[1, 2], wildcard_mention_policy=[6, 5, 4, 3, 2, 1], diff --git a/zerver/tests/test_realm.py b/zerver/tests/test_realm.py index 035474c9e2..8f6c89770d 100644 --- a/zerver/tests/test_realm.py +++ b/zerver/tests/test_realm.py @@ -851,6 +851,7 @@ class RealmAPITest(ZulipTestCase): Realm.POLICY_ADMINS_ONLY, Realm.POLICY_MEMBERS_ONLY, Realm.POLICY_FULL_MEMBERS_ONLY, + Realm.POLICY_MODERATORS_ONLY, ], user_group_edit_policy=[ Realm.USER_GROUP_EDIT_POLICY_ADMINS, @@ -864,6 +865,7 @@ class RealmAPITest(ZulipTestCase): Realm.POLICY_ADMINS_ONLY, Realm.POLICY_MEMBERS_ONLY, Realm.POLICY_FULL_MEMBERS_ONLY, + Realm.POLICY_MODERATORS_ONLY, ], wildcard_mention_policy=[ Realm.WILDCARD_MENTION_POLICY_EVERYONE,