test-backend: Raise zerver/views/realm.py test coverage to 100%.

This commit is contained in:
Elliott Jin 2017-02-25 11:53:32 -08:00 committed by Tim Abbott
parent b2b1977138
commit f038cd47d9
2 changed files with 7 additions and 1 deletions

View File

@ -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',

View File

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