Skip to content
Snippets Groups Projects
Commit a79605d2 authored by ml bonhomme's avatar ml bonhomme :bee: Committed by Erwan Rouchet
Browse files

fix intermittent test failure on test_bulk_create_multiple_parent_paths

parent e4b66dee
No related branches found
No related tags found
1 merge request!1666fix intermittent test failure on test_bulk_create_multiple_parent_paths
......@@ -197,7 +197,7 @@ class TestBulkElements(FixtureAPITestCase):
type=self.corpus.types.first(),
)
self.element.add_parent(parent)
element_path1, element_path2 = self.element.paths.all()
element_path1, element_path2 = self.element.paths.order_by('path__0')
self.client.force_login(self.user)
with self.assertNumQueries(13):
......@@ -214,9 +214,9 @@ class TestBulkElements(FixtureAPITestCase):
.filter(type__slug__in=('act', 'surface')) \
.order_by('name')
a_path1, a_path2 = a.paths.all()
b_path1, b_path2 = b.paths.all()
c_path1, c_path2 = c.paths.all()
a_path1, a_path2 = a.paths.order_by('path__0')
b_path1, b_path2 = b.paths.order_by('path__0')
c_path1, c_path2 = c.paths.order_by('path__0')
self.assertListEqual(a_path1.path, element_path1.path + [self.element.id])
self.assertListEqual(a_path2.path, element_path2.path + [self.element.id])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment