diff options
| author | Tim Graham <timograham@gmail.com> | 2020-11-08 19:55:50 -0500 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-11-09 08:12:00 +0100 |
| commit | dbb4a86fa7c15fb9cf73a5954356eb88d65ac25f (patch) | |
| tree | 79dadb10e26de391cb6352959aedb6524cd8994e /tests | |
| parent | 69ffaa297c07affd39d730e09c34d1cfad6ca883 (diff) | |
Renamed BaseSpatialOperations.geography to BaseSpatialFeatures.supports_geography.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/geogapp/tests.py | 2 | ||||
| -rw-r--r-- | tests/gis_tests/inspectapp/tests.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/gis_tests/geogapp/tests.py b/tests/gis_tests/geogapp/tests.py index 9cf8ab92f7..507d8a970e 100644 --- a/tests/gis_tests/geogapp/tests.py +++ b/tests/gis_tests/geogapp/tests.py @@ -95,7 +95,7 @@ class GeographyFunctionTests(FuncTestMixin, TestCase): Cast a geography to a geometry field for an aggregate function that expects a geometry input. """ - if not connection.ops.geography: + if not connection.features.supports_geography: self.skipTest("This test needs geography support") expected = (-96.8016128540039, 29.7633724212646, -95.3631439208984, 32.782058715820) res = City.objects.filter( diff --git a/tests/gis_tests/inspectapp/tests.py b/tests/gis_tests/inspectapp/tests.py index 5fac4d9884..61e7d3543a 100644 --- a/tests/gis_tests/inspectapp/tests.py +++ b/tests/gis_tests/inspectapp/tests.py @@ -10,7 +10,7 @@ from django.test import SimpleTestCase, TestCase, skipUnlessDBFeature from django.test.utils import modify_settings from ..test_data import TEST_DATA -from ..utils import mariadb, postgis +from ..utils import mariadb from .models import AllOGRFields @@ -44,9 +44,10 @@ class InspectDbTests(TestCase): output = out.getvalue() if connection.features.supports_geometry_field_introspection: self.assertIn('point = models.PointField(dim=3)', output) - if postgis: - # Geography type is specific to PostGIS + if connection.features.supports_geography: self.assertIn('pointg = models.PointField(geography=True, dim=3)', output) + else: + self.assertIn('pointg = models.PointField(dim=3)', output) self.assertIn('line = models.LineStringField(dim=3)', output) self.assertIn('poly = models.PolygonField(dim=3)', output) else: |
