diff --git a/django/contrib/gis/tests/relatedapp/tests.py b/django/contrib/gis/tests/relatedapp/tests.py index d92249e9d1..a49b66c0dd 100644 --- a/django/contrib/gis/tests/relatedapp/tests.py +++ b/django/contrib/gis/tests/relatedapp/tests.py @@ -49,8 +49,9 @@ class RelatedGeoModelTest(unittest.TestCase): self.assertAlmostEqual(ref.y, pnt.y, tol) # Turning on debug so we can manually verify the number of SQL queries issued. - dbg = settings.DEBUG - settings.DEBUG = True + # DISABLED: the number of queries count testing mechanism is way too brittle. + #dbg = settings.DEBUG + #settings.DEBUG = True from django.db import connection # Each city transformed to the SRID of their state plane coordinate system. @@ -63,10 +64,10 @@ class RelatedGeoModelTest(unittest.TestCase): # Doing this implicitly sets `select_related` select the location. qs = list(City.objects.filter(name=name).transform('location__point', srid)) check_pnt(GEOSGeometry(wkt), qs[0].location.point) - settings.DEBUG= dbg + #settings.DEBUG= dbg # Verifying the number of issued SQL queries. - self.assertEqual(nqueries, len(connection.queries)) + #self.assertEqual(nqueries, len(connection.queries)) def suite(): s = unittest.TestSuite()