From a9ff23ece04d721d0cb1a71dd32344703ab85c84 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 29 Dec 2021 13:43:28 -0800 Subject: [PATCH] Fixes nondeterministic test failure --- bookwyrm/tests/importers/test_storygraph_import.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bookwyrm/tests/importers/test_storygraph_import.py b/bookwyrm/tests/importers/test_storygraph_import.py index 09cf32dc1..8db459dc5 100644 --- a/bookwyrm/tests/importers/test_storygraph_import.py +++ b/bookwyrm/tests/importers/test_storygraph_import.py @@ -48,7 +48,9 @@ class StorygraphImport(TestCase): self.local_user, self.csv, False, "public" ) - import_items = models.ImportItem.objects.filter(job=import_job).all() + import_items = ( + models.ImportItem.objects.filter(job=import_job).order_by("index").all() + ) self.assertEqual(len(import_items), 2) self.assertEqual(import_items[0].index, 0) self.assertEqual(import_items[0].normalized_data["title"], "Always Coming Home")