mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #31162 -- Prevented error logs when using WKT strings in lookups.
Thanks dbxnr for the initial patch.
Regression in 6f44f714c9.
This commit is contained in:
@@ -430,6 +430,12 @@ class GeoLookupTest(TestCase):
|
||||
with self.subTest(lookup=lookup):
|
||||
self.assertNotIn(null, State.objects.filter(**{'poly__%s' % lookup: geom}))
|
||||
|
||||
def test_wkt_string_in_lookup(self):
|
||||
# Valid WKT strings don't emit error logs.
|
||||
with self.assertRaisesMessage(AssertionError, 'no logs'):
|
||||
with self.assertLogs('django.contrib.gis', 'ERROR'):
|
||||
State.objects.filter(poly__intersects='LINESTRING(0 0, 1 1, 5 5)')
|
||||
|
||||
@skipUnlessDBFeature("supports_relate_lookup")
|
||||
def test_relate_lookup(self):
|
||||
"Testing the 'relate' lookup type."
|
||||
|
||||
Reference in New Issue
Block a user