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.
This commit is contained in:
Prakhar Pratyush
2023-08-03 03:13:09 +05:30
committed by Tim Abbott
parent 40e40e09ba
commit ef64d8df97

View File

@@ -1176,7 +1176,6 @@ class UserProfileTest(ZulipTestCase):
iago = self.example_user("iago") iago = self.example_user("iago")
cordelia = self.example_user("cordelia") cordelia = self.example_user("cordelia")
hamlet = self.example_user("hamlet") hamlet = self.example_user("hamlet")
hamlet.color_scheme = UserProfile.COLOR_SCHEME_LIGHT
cordelia.default_language = "de" cordelia.default_language = "de"
cordelia.default_view = "all_messages" cordelia.default_view = "all_messages"
@@ -1225,7 +1224,7 @@ class UserProfileTest(ZulipTestCase):
self.assertEqual(iago.color_scheme, UserProfile.COLOR_SCHEME_NIGHT) self.assertEqual(iago.color_scheme, UserProfile.COLOR_SCHEME_NIGHT)
self.assertEqual(cordelia.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(iago.enable_offline_email_notifications, False)
self.assertEqual(cordelia.enable_offline_email_notifications, False) self.assertEqual(cordelia.enable_offline_email_notifications, False)