From f1c0309971c33d1220eb272121034892cab7230d Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 9 Sep 2021 11:28:42 -0700 Subject: [PATCH] test_users: Fix comparison of differently sorted sets. This fixes a nondeterministic test failure in main. --- zerver/tests/test_users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/tests/test_users.py b/zerver/tests/test_users.py index 1868b1106a..62f0c8aa97 100644 --- a/zerver/tests/test_users.py +++ b/zerver/tests/test_users.py @@ -1175,7 +1175,7 @@ class UserProfileTest(ZulipTestCase): UserHotspot.objects.filter(user=cordelia).delete() UserHotspot.objects.filter(user=iago).delete() - hotspots_completed = ["intro_reply", "intro_streams", "intro_topics"] + hotspots_completed = {"intro_reply", "intro_streams", "intro_topics"} for hotspot in hotspots_completed: UserHotspot.objects.create(user=cordelia, hotspot=hotspot) @@ -1220,7 +1220,7 @@ class UserProfileTest(ZulipTestCase): self.assertEqual(cordelia.enter_sends, False) self.assertEqual(hamlet.enter_sends, True) - hotspots = list(UserHotspot.objects.filter(user=iago).values_list("hotspot", flat=True)) + hotspots = set(UserHotspot.objects.filter(user=iago).values_list("hotspot", flat=True)) self.assertEqual(hotspots, hotspots_completed) def test_copy_default_settings_from_realm_user_default(self) -> None: