Fixed RelatedGeoModelTest.test08_defer_only() on MySQL 8+ with MyISAM storage engine.

This commit is contained in:
Mariusz Felisiak 2022-07-05 19:05:03 +02:00 committed by GitHub
parent 18c5ba07cc
commit 73766c1187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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)