From ef64d8df97a1e010f9909e1f1ddddf070d127d4c Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Thu, 3 Aug 2023 03:13:09 +0530 Subject: [PATCH] test_users: Update a test to use the default values for 'hamlet'. In 'test_copy_default_settings_from_another_user', we verify that 'cordelia' and 'iago' have the same values for their user settings, but 'hamlet' has the defaults. Earlier, we explicitly set the 'color_scheme' setting for 'hamlet' as 'UserProfile.COLOR_SCHEME_NIGHT', which is not needed. As we verify, 'hamlet' should have the defaults. So just verifying if the 'color_scheme' setting for 'hamlet' is 'UserProfile.COLOR_SCHEME_AUTOMATIC' (default) fulfils our purpose. The extra line of code was introduced in b10f156. --- zerver/tests/test_users.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zerver/tests/test_users.py b/zerver/tests/test_users.py index 46bfa3c5c5..5c8455d9d2 100644 --- a/zerver/tests/test_users.py +++ b/zerver/tests/test_users.py @@ -1176,7 +1176,6 @@ class UserProfileTest(ZulipTestCase): iago = self.example_user("iago") cordelia = self.example_user("cordelia") hamlet = self.example_user("hamlet") - hamlet.color_scheme = UserProfile.COLOR_SCHEME_LIGHT cordelia.default_language = "de" cordelia.default_view = "all_messages" @@ -1225,7 +1224,7 @@ class UserProfileTest(ZulipTestCase): self.assertEqual(iago.color_scheme, UserProfile.COLOR_SCHEME_NIGHT) self.assertEqual(cordelia.color_scheme, UserProfile.COLOR_SCHEME_NIGHT) - self.assertEqual(hamlet.color_scheme, UserProfile.COLOR_SCHEME_LIGHT) + self.assertEqual(hamlet.color_scheme, UserProfile.COLOR_SCHEME_AUTOMATIC) self.assertEqual(iago.enable_offline_email_notifications, False) self.assertEqual(cordelia.enable_offline_email_notifications, False)