summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2021-01-02 15:39:48 -0500
committerGitHub <noreply@github.com>2021-01-02 21:39:48 +0100
commit060e6bdd1f96f46d43fa34636284c20525a96f20 (patch)
treef93a0a79db93c6b7886bd484fc6f472d0430049e
parent656b331b13e08e82bbf0b88d39080c5b1a02109c (diff)
Replaced DatabaseFeatures.supports_left_right_lookups with skipUnlessGISLookup.
-rw-r--r--django/contrib/gis/db/backends/base/features.py3
-rw-r--r--django/contrib/gis/db/backends/postgis/features.py1
-rw-r--r--tests/gis_tests/geoapp/tests.py2
3 files changed, 1 insertions, 5 deletions
diff --git a/django/contrib/gis/db/backends/base/features.py b/django/contrib/gis/db/backends/base/features.py
index 9d1c1b04da..73240f6ccb 100644
--- a/django/contrib/gis/db/backends/base/features.py
+++ b/django/contrib/gis/db/backends/base/features.py
@@ -35,9 +35,6 @@ class BaseSpatialFeatures:
# Is the database able to count vertices on polygons (with `num_points`)?
supports_num_points_poly = True
- # The following properties indicate if the database backend support
- # certain lookups (dwithin, left and right, relate, ...)
- supports_left_right_lookups = False
# Does the backend support expressions for specifying distance in the
# dwithin lookup?
supports_dwithin_distance_expr = True
diff --git a/django/contrib/gis/db/backends/postgis/features.py b/django/contrib/gis/db/backends/postgis/features.py
index 1607f29bbf..f73e5547a5 100644
--- a/django/contrib/gis/db/backends/postgis/features.py
+++ b/django/contrib/gis/db/backends/postgis/features.py
@@ -8,6 +8,5 @@ class DatabaseFeatures(BaseSpatialFeatures, Psycopg2DatabaseFeatures):
supports_geography = True
supports_3d_storage = True
supports_3d_functions = True
- supports_left_right_lookups = True
supports_raster = True
supports_empty_geometries = True
diff --git a/tests/gis_tests/geoapp/tests.py b/tests/gis_tests/geoapp/tests.py
index 94cb4b10de..9ac6928772 100644
--- a/tests/gis_tests/geoapp/tests.py
+++ b/tests/gis_tests/geoapp/tests.py
@@ -308,7 +308,7 @@ class GeoLookupTest(TestCase):
self.assertEqual(qs.filter(poly__isvalid=False).count(), 1)
self.assertEqual(qs.filter(poly__isvalid=True).count(), qs.count() - 1)
- @skipUnlessDBFeature("supports_left_right_lookups")
+ @skipUnlessGISLookup('left', 'right')
def test_left_right_lookups(self):
"Testing the 'left' and 'right' lookup types."
# Left: A << B => true if xmax(A) < xmin(B)