From 6435791849e9f386dc150d63c06025148698bb2d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 28 Oct 2016 14:22:55 +0200 Subject: Make the use of spatialite for tests not mandatory --- example_project/local_settings.py.gitlab-ci | 1 + example_project/settings.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/example_project/local_settings.py.gitlab-ci b/example_project/local_settings.py.gitlab-ci index 7f4bcefa1..81196b4a0 100644 --- a/example_project/local_settings.py.gitlab-ci +++ b/example_project/local_settings.py.gitlab-ci @@ -12,3 +12,4 @@ DATABASES = { LOGFILE = '/tmp/ishtar.log' PROJECT_SLUG = "CI-instance" +USE_SPATIALITE_FOR_TESTS = False diff --git a/example_project/settings.py b/example_project/settings.py index 104569e29..26119451a 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -10,6 +10,7 @@ DEBUG_TOOLBAR = False TEMPLATE_DEBUG = DEBUG SQL_DEBUG = False DJANGO_EXTENSIONS = False +USE_SPATIALITE_FOR_TESTS = True if "test" in sys.argv: sys.path.insert(0, '..') @@ -235,6 +236,8 @@ except ImportError, e: if 'test' in sys.argv: SOUTH_TESTS_MIGRATE = False + +if USE_SPATIALITE_FOR_TESTS: DATABASES['default']['ENGINE'] = \ 'django.contrib.gis.db.backends.spatialite' -- cgit v1.2.3