Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

tests: Add an explicit order_by to prevent flakes.

Alex Vandiver0078f16f06ec
diff --git a/zerver/tests/test_transfer.py b/zerver/tests/test_transfer.py
index 352db60f472..ab12fe8ee28 100644
--- a/zerver/tests/test_transfer.py
+++ b/zerver/tests/test_transfer.py
@@ -63,7 +63,7 @@ class TransferUploadsToS3Test(ZulipTestCase):
with self.assertLogs(level="INFO"):
transfer_message_files_to_s3(1)
- attachments = Attachment.objects.all()
+ attachments = Attachment.objects.all().order_by("id")
self.assertEqual(len(list(bucket.objects.all())), 2)
self.assertEqual(bucket.Object(attachments[0].path_id).get()['Body'].read(), b'zulip1!')