Fixes nondeterministic test failure

This commit is contained in:
Mouse Reeve 2021-12-29 13:43:28 -08:00
parent e1ab346418
commit a9ff23ece0

View file

@ -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")