[Python-modules-commits] [djangorestframework-gis] 03/09: Use spatialite backend for tests.
Michael Fladischer
fladi at moszumanska.debian.org
Fri May 12 18:33:02 UTC 2017
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch experimental
in repository djangorestframework-gis.
commit 0b06141202a2b9164f58fa721a37a32d0f4c3419
Author: Michael Fladischer <fladi at debian.org>
Date: Thu Oct 8 08:58:54 2015 -0700
Use spatialite backend for tests.
Some of the upstream tests are designed to test features only supported on a
PostGIS enable database. To make the tests run with an embedded spatialite
database, those tests are skipped if the database connection ist not done using
the PostGIS driver.
See the following URL for a compatibility matrix:
https://docs.djangoproject.com/en/1.7/ref/contrib/gis/db-api/#compatibility-tables
Forwarded: not-needed
Patch-Name: spatialite.patch
---
tests/settings.py | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/tests/settings.py b/tests/settings.py
index 39b5df0..c628f97 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -7,15 +7,15 @@ TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
- 'ENGINE': 'django.contrib.gis.db.backends.postgis',
- 'NAME': 'django_restframework_gis',
- 'USER': 'postgres',
- 'PASSWORD': 'postgres',
- 'HOST': '',
- 'PORT': ''
+ 'ENGINE': 'django.contrib.gis.db.backends.spatialite',
+ 'NAME': 'test.db',
},
}
+# Support mod_spatialite:
+# https://code.djangoproject.com/ticket/23901
+SPATIALITE_LIBRARY_PATH = 'mod_spatialite'
+
SECRET_KEY = 'fn)t*+$)ugeyip6-#txyy$5wf2ervc0d2n#h)qb)y5 at ly$t*@w'
INSTALLED_APPS = (
@@ -72,6 +72,8 @@ MEDIA_URL = '/media/'
STATIC_ROOT = '%s/static/' % SITE_ROOT
STATIC_URL = '/static/'
+ANONYMOUS_USER_ID=-1
+
TEMPLATE_STRING_IF_INVALID = 'INVALID_TEMPLATE: %s END_INVALID_TEMPLATE'
# local settings must be imported before test runner otherwise they'll be ignored
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/djangorestframework-gis.git
More information about the Python-modules-commits
mailing list