[Python-modules-commits] [djangorestframework-gis] 08/12: Use spatialite backend for tests.
Michael Fladischer
fladi at moszumanska.debian.org
Thu Jan 7 11:46:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch master
in repository djangorestframework-gis.
commit bac492a7f71395bf70133163a7dbbc765ac0dd23
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 150eb82..d9edb92 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 = (
@@ -52,6 +52,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