From f038cd47d9d045af648ffd745fd5483a8424d0f9 Mon Sep 17 00:00:00 2001 From: Elliott Jin Date: Sat, 25 Feb 2017 11:53:32 -0800 Subject: [PATCH] test-backend: Raise zerver/views/realm.py test coverage to 100%. --- tools/test-backend | 1 - zerver/tests/tests.py | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/test-backend b/tools/test-backend index fabe288609..af6542c477 100755 --- a/tools/test-backend +++ b/tools/test-backend @@ -100,7 +100,6 @@ not_yet_fully_covered = { 'zerver/views/report.py', 'zerver/views/unsubscribe.py', 'zerver/views/zephyr.py', - 'zerver/views/realm.py', 'zerver/views/invite.py', 'zerver/views/home.py', 'zerver/views/registration.py', diff --git a/zerver/tests/tests.py b/zerver/tests/tests.py index 9505b20f9e..65d0844d31 100644 --- a/zerver/tests/tests.py +++ b/zerver/tests/tests.py @@ -210,6 +210,13 @@ class RealmTest(ZulipTestCase): self.assertEqual(realm.allow_message_editing, False) self.assertEqual(realm.message_content_edit_limit_seconds, 200) + # waiting_period_threshold + set_up_db('waiting_period_threshold', 10) + realm = update_with_api(waiting_period_threshold=20) + self.assertEqual(realm.waiting_period_threshold, 20) + realm = update_with_api(waiting_period_threshold=10) + self.assertEqual(realm.waiting_period_threshold, 10) + def test_admin_restrictions_for_changing_realm_name(self): # type: () -> None new_name = 'Mice will play while the cat is away'