From 14057603c747eed7ee0bb8fe1fb34b330caa6c58 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 5 Jul 2022 19:05:03 +0200 Subject: [PATCH] [4.1.x] Fixed RelatedGeoModelTest.test08_defer_only() on MySQL 8+ with MyISAM storage engine. Backport of 73766c118781a7f7052bf0a5fbee38b944964e31 from main --- tests/gis_tests/relatedapp/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/gis_tests/relatedapp/tests.py b/tests/gis_tests/relatedapp/tests.py index 52abf7ba4b..e11a410afc 100644 --- a/tests/gis_tests/relatedapp/tests.py +++ b/tests/gis_tests/relatedapp/tests.py @@ -201,8 +201,8 @@ class RelatedGeoModelTest(TestCase): def test08_defer_only(self): "Testing defer() and only() on Geographic models." - qs = Location.objects.all() - def_qs = Location.objects.defer("point") + qs = Location.objects.all().order_by("pk") + def_qs = Location.objects.defer("point").order_by("pk") for loc, def_loc in zip(qs, def_qs): self.assertEqual(loc.point, def_loc.point)