From 77471a5b44b394e1c8ea838160156d253f64bae4 Mon Sep 17 00:00:00 2001 From: sahil839 Date: Tue, 6 Jul 2021 21:40:40 +0530 Subject: [PATCH] tests: Remove test_change_email_address_visibility from test_realm.py. This commit removes test_change_email_address_visibility which is used to test changing email_address_visibility using 'PATCH /realm' endpoint as we already do this in do_test_realm_update_api and invalid value is also tested in test_invalid_integer_attribute_values. --- zerver/tests/test_realm.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/zerver/tests/test_realm.py b/zerver/tests/test_realm.py index 0d51a6ef1e..2314d4e1b1 100644 --- a/zerver/tests/test_realm.py +++ b/zerver/tests/test_realm.py @@ -466,24 +466,6 @@ class RealmTest(ZulipTestCase): result = self.client_patch("/json/realm", req) self.assert_json_error(result, "Invalid bot_creation_policy") - def test_change_email_address_visibility(self) -> None: - # We need an admin user. - user_profile = self.example_user("iago") - - self.login_user(user_profile) - invalid_value = 12 - req = dict(email_address_visibility=orjson.dumps(invalid_value).decode()) - result = self.client_patch("/json/realm", req) - self.assert_json_error(result, "Invalid email_address_visibility") - - req = dict( - email_address_visibility=orjson.dumps(Realm.EMAIL_ADDRESS_VISIBILITY_ADMINS).decode() - ) - result = self.client_patch("/json/realm", req) - self.assert_json_success(result) - realm = get_realm("zulip") - self.assertEqual(realm.email_address_visibility, Realm.EMAIL_ADDRESS_VISIBILITY_ADMINS) - def test_invalid_integer_attribute_values(self) -> None: integer_values = [key for key, value in Realm.property_types.items() if value is int]