From 1e334f41ed1d15aca9e99c9d9c8e8780c01724fc Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 17 Nov 2017 15:31:54 -0800 Subject: [PATCH] test_subs: Fix nondeterministic failures in default stream tests. Here we sort the streams before comparing them. --- zerver/tests/test_subs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py index 947c0224af..bc1d05317c 100644 --- a/zerver/tests/test_subs.py +++ b/zerver/tests/test_subs.py @@ -897,7 +897,7 @@ class DefaultStreamGroupTest(ZulipTestCase): self.assert_length(default_stream_groups, 1) self.assertEqual(default_stream_groups[0].name, group_name) self.assertEqual(default_stream_groups[0].description, description) - self.assertEqual(list(default_stream_groups[0].streams.all()), streams) + self.assertEqual(list(default_stream_groups[0].streams.all().order_by("id")), streams) # Test adding streams to existing default stream group group_id = default_stream_groups[0].id