summaryrefslogtreecommitdiff
path: root/tests/gis_tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-07-05 19:05:03 +0200
committerGitHub <noreply@github.com>2022-07-05 19:05:03 +0200
commit73766c118781a7f7052bf0a5fbee38b944964e31 (patch)
tree0e044103740e5c79b8bdcaa808b63b09b569a575 /tests/gis_tests
parent18c5ba07cc81be993941ecc2ecc17923b401b66f (diff)
downloaddjango-73766c118781a7f7052bf0a5fbee38b944964e31.tar.gz
Fixed RelatedGeoModelTest.test08_defer_only() on MySQL 8+ with MyISAM storage engine.
Diffstat (limited to 'tests/gis_tests')
-rw-r--r--tests/gis_tests/relatedapp/tests.py4
1 files 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)