From a57ca559f3c0e0c4699298445d4c8fe2598f437b Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Fri, 15 Nov 2024 15:14:50 -0800 Subject: [PATCH] Ensure consistent sorting of actual and expected data. --- kolibri/core/content/test/test_content_app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kolibri/core/content/test/test_content_app.py b/kolibri/core/content/test/test_content_app.py index 3de78fd2451..881fdda469a 100644 --- a/kolibri/core/content/test/test_content_app.py +++ b/kolibri/core/content/test/test_content_app.py @@ -465,6 +465,8 @@ def test_contentnode_list_long(self): def _recurse_and_assert(self, data, nodes, recursion_depth=0): recursion_depths = [] + data = sorted(data, key=lambda x: x["id"]) + nodes = sorted(nodes, key=lambda x: x.id) for actual, expected in zip(data, nodes): children = actual.pop("children", None) self._assert_node(actual, expected)