Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

test_events: Use the list defined in models.py for realm update tests.

Sahil Batra402968ccf346
diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py
index b4d80454f48..d45f65a9fd1 100644
--- a/zerver/tests/test_events.py
+++ b/zerver/tests/test_events.py
@@ -2127,14 +2127,14 @@ class RealmPropertyActionTest(BaseAction):
message_retention_days=[10, 20],
name=["Zulip", "New Name"],
waiting_period_threshold=[10, 20],
- create_public_stream_policy=[4, 3, 2, 1],
- create_private_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, 3, 4],
- wildcard_mention_policy=[7, 6, 5, 4, 3, 2, 1],
+ create_public_stream_policy=Realm.COMMON_POLICY_TYPES,
+ create_private_stream_policy=Realm.COMMON_POLICY_TYPES,
+ invite_to_stream_policy=Realm.COMMON_POLICY_TYPES,
+ private_message_policy=Realm.PRIVATE_MESSAGE_POLICY_TYPES,
+ user_group_edit_policy=Realm.COMMON_POLICY_TYPES,
+ wildcard_mention_policy=Realm.WILDCARD_MENTION_POLICY_TYPES,
email_address_visibility=[Realm.EMAIL_ADDRESS_VISIBILITY_ADMINS],
- bot_creation_policy=[Realm.BOT_CREATION_EVERYONE],
+ bot_creation_policy=Realm.BOT_CREATION_POLICY_TYPES,
video_chat_provider=[
Realm.VIDEO_CHAT_PROVIDERS["jitsi_meet"]["id"],
],
@@ -2143,10 +2143,10 @@ class RealmPropertyActionTest(BaseAction):
],
default_code_block_language=["python", "javascript"],
message_content_delete_limit_seconds=[1000, 1100, 1200],
- invite_to_realm_policy=[6, 4, 3, 2, 1],
- move_messages_between_streams_policy=[4, 3, 2, 1],
- add_custom_emoji_policy=[4, 3, 2, 1],
- delete_own_message_policy=[5, 4, 3, 2, 1],
+ invite_to_realm_policy=Realm.INVITE_TO_REALM_POLICY_TYPES,
+ move_messages_between_streams_policy=Realm.COMMON_POLICY_TYPES,
+ add_custom_emoji_policy=Realm.COMMON_POLICY_TYPES,
+ delete_own_message_policy=Realm.COMMON_MESSAGE_POLICY_TYPES,
)
vals = test_values.get(name)