From 6295ea0027d808dcc309aa42cc58f6fdf172c3fc Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sun, 17 Aug 2014 19:06:25 +0200 Subject: Replaced HAS_SPATIAL_DB by testing database feature Refs #22632. This should be the base for using more database features to exclude specific backends in GIS tests. Thanks Tim Graham for the review. --- tests/runtests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/runtests.py b/tests/runtests.py index c32cc32cdf..ed14bdb666 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -60,13 +60,12 @@ ALWAYS_MIDDLEWARE_CLASSES = ( def get_test_modules(): - from django.contrib.gis.tests.utils import HAS_SPATIAL_DB modules = [] discovery_paths = [ (None, RUNTESTS_DIR), (CONTRIB_MODULE_PATH, CONTRIB_DIR) ] - if HAS_SPATIAL_DB: + if connection.features.gis_enabled: discovery_paths.append( ('django.contrib.gis.tests', os.path.join(CONTRIB_DIR, 'gis', 'tests')) ) -- cgit v1.3