diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-07-05 19:05:03 +0200 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-07-05 19:06:39 +0200 |
commit | 48501c84ad54971af25c10b3544aee91b6275c86 (patch) | |
tree | 2eb0f52d4436b71f1b1ecbc76b2c3b37e1f2d9a2 | |
parent | 6a830bf90048ba0f1beefb80d02d8a39d57f392d (diff) | |
download | django-48501c84ad54971af25c10b3544aee91b6275c86.tar.gz |
[4.0.x] Fixed RelatedGeoModelTest.test08_defer_only() on MySQL 8+ with MyISAM storage engine.
Backport of 73766c118781a7f7052bf0a5fbee38b944964e31 from main
-rw-r--r-- | tests/gis_tests/relatedapp/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gis_tests/relatedapp/tests.py b/tests/gis_tests/relatedapp/tests.py index d93fe3b76b..fa8c6da1a2 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) |