diff options
| author | Tim Graham <timograham@gmail.com> | 2017-05-04 10:14:35 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-05-04 20:54:25 -0400 |
| commit | 444cdf61314e420c10f713ba7a5fa084b0b2dfd5 (patch) | |
| tree | db8b78521351e294d17c6e01367fbdede76c0424 /tests/gis_tests/layermap | |
| parent | c679ac04499798e366ca594f97e4f95d3da3682f (diff) | |
[1.11.x] Made runtests.py run gis_tests only when using a GIS database backend.
This facilitates other changes like refs #28160.
Backport of 890537253cf235091816d27a5c2fb64943c8e34a from master
Diffstat (limited to 'tests/gis_tests/layermap')
| -rw-r--r-- | tests/gis_tests/layermap/models.py | 6 | ||||
| -rw-r--r-- | tests/gis_tests/layermap/tests.py | 4 |
2 files changed, 1 insertions, 9 deletions
diff --git a/tests/gis_tests/layermap/models.py b/tests/gis_tests/layermap/models.py index 25dd0e4bcd..17628ffdda 100644 --- a/tests/gis_tests/layermap/models.py +++ b/tests/gis_tests/layermap/models.py @@ -8,7 +8,6 @@ class NamedModel(models.Model): class Meta: abstract = True - required_db_features = ['gis_enabled'] def __str__(self): return self.name @@ -37,7 +36,6 @@ class City(NamedModel): class Meta: app_label = 'layermap' - required_db_features = ['gis_enabled'] class Interstate(NamedModel): @@ -46,7 +44,6 @@ class Interstate(NamedModel): class Meta: app_label = 'layermap' - required_db_features = ['gis_enabled'] # Same as `City` above, but for testing model inheritance. @@ -73,9 +70,6 @@ class ICity2(ICity1): class Invalid(models.Model): point = models.PointField() - class Meta: - required_db_features = ['gis_enabled'] - # Mapping dictionaries for the models above. co_mapping = { diff --git a/tests/gis_tests/layermap/tests.py b/tests/gis_tests/layermap/tests.py index a8a352eda5..cf2c05f004 100644 --- a/tests/gis_tests/layermap/tests.py +++ b/tests/gis_tests/layermap/tests.py @@ -10,7 +10,7 @@ from django.conf import settings from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geos import HAS_GEOS from django.db import connection -from django.test import TestCase, override_settings, skipUnlessDBFeature +from django.test import TestCase, override_settings from django.utils._os import upath if HAS_GEOS and HAS_GDAL: @@ -38,7 +38,6 @@ NUMS = [1, 2, 1, 19, 1] # Number of polygons for each. STATES = ['Texas', 'Texas', 'Texas', 'Hawaii', 'Colorado'] -@skipUnlessDBFeature("gis_enabled") class LayerMapTest(TestCase): def test_init(self): @@ -335,7 +334,6 @@ class OtherRouter(object): return True -@skipUnlessDBFeature("gis_enabled") @override_settings(DATABASE_ROUTERS=[OtherRouter()]) class LayerMapRouterTest(TestCase): |
