summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2017-12-06 14:59:30 +0500
committerTim Graham <timograham@gmail.com>2017-12-12 17:12:04 -1000
commitda71e4bb086593b5ca76bf698358d27ead2cfed2 (patch)
tree640b21d43a88bc67508314e8f11e5194e27a7e99 /tests
parent10bfa876be59feec24bb6a40fa11bece808ee405 (diff)
Fixed #28896 -- Reallowed filtering a queryset with GeometryField=None.
Regression in 58da81a5a372a69f0bac801c412b57f3cce5f188.
Diffstat (limited to 'tests')
-rw-r--r--tests/gis_tests/geoapp/tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/gis_tests/geoapp/tests.py b/tests/gis_tests/geoapp/tests.py
index b5f4078981..cfc6829fff 100644
--- a/tests/gis_tests/geoapp/tests.py
+++ b/tests/gis_tests/geoapp/tests.py
@@ -385,6 +385,9 @@ class GeoLookupTest(TestCase):
# Puerto Rico should be NULL (it's a commonwealth unincorporated territory)
self.assertEqual(1, len(nullqs))
self.assertEqual('Puerto Rico', nullqs[0].name)
+ # GeometryField=None is an alias for __isnull=True.
+ self.assertCountEqual(State.objects.filter(poly=None), nullqs)
+ self.assertCountEqual(State.objects.exclude(poly=None), validqs)
# The valid states should be Colorado & Kansas
self.assertEqual(2, len(validqs))