From 6745cd73ccbd840ee77e81d05fd7e86bea070636 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 28 Dec 2021 15:53:35 -0800 Subject: [PATCH] Deterministic ordering for OL import test --- bookwyrm/tests/importers/test_openlibrary_import.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bookwyrm/tests/importers/test_openlibrary_import.py b/bookwyrm/tests/importers/test_openlibrary_import.py index d53f5596..6a25c191 100644 --- a/bookwyrm/tests/importers/test_openlibrary_import.py +++ b/bookwyrm/tests/importers/test_openlibrary_import.py @@ -48,7 +48,9 @@ class OpenLibraryImport(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), 4) self.assertEqual(import_items[0].index, 0) self.assertEqual(import_items[0].data["Work Id"], "OL102749W")