test_subs: Fix nondeterministic failures in default stream tests.

Here we sort the streams before comparing them.
This commit is contained in:
Tim Abbott 2017-11-17 15:31:54 -08:00
parent a194f17c2a
commit 1e334f41ed
1 changed files with 1 additions and 1 deletions

View File

@ -897,7 +897,7 @@ class DefaultStreamGroupTest(ZulipTestCase):
self.assert_length(default_stream_groups, 1) self.assert_length(default_stream_groups, 1)
self.assertEqual(default_stream_groups[0].name, group_name) self.assertEqual(default_stream_groups[0].name, group_name)
self.assertEqual(default_stream_groups[0].description, description) 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 # Test adding streams to existing default stream group
group_id = default_stream_groups[0].id group_id = default_stream_groups[0].id