[Python-modules-commits] [djangorestframework-gis] 08/09: merge patched into master

Michael Fladischer fladi at moszumanska.debian.org
Fri Dec 11 11:45:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch master
in repository djangorestframework-gis.

commit b281657aedaebe8b4cf4848a76f25d8fe91c8685
Merge: f74b4e4 886774f
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Fri Dec 11 12:11:45 2015 +0100

    merge patched into master

 debian/.git-dpm                                     |  4 ++--
 debian/patches/skip_tests_spatialite.patch          | 21 +++++++++++----------
 debian/patches/spatialite.patch                     |  2 +-
 .../django_restframework_gis_tests/test_filters.py  |  3 ++-
 4 files changed, 16 insertions(+), 14 deletions(-)

diff --cc debian/.git-dpm
index 24a1a5a,0000000..fca86c9
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- aa6647a3c12066737026058e668b31cdc9dc22a6
- aa6647a3c12066737026058e668b31cdc9dc22a6
++886774f13b4dbe4bcb809d4473e51d3e0914f561
++886774f13b4dbe4bcb809d4473e51d3e0914f561
 +24f848a5f020c5318537e3814c5598cf279c2092
 +24f848a5f020c5318537e3814c5598cf279c2092
 +djangorestframework-gis_0.10.0.orig.tar.gz
 +5fdd9ff4ee2c149407ec48cd8560d2539eb6d5a6
 +26047
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/skip_tests_spatialite.patch
index b43fcd8,0000000..492d453
mode 100644,000000..100644
--- a/debian/patches/skip_tests_spatialite.patch
+++ b/debian/patches/skip_tests_spatialite.patch
@@@ -1,56 -1,0 +1,57 @@@
- From aa6647a3c12066737026058e668b31cdc9dc22a6 Mon Sep 17 00:00:00 2001
++From 886774f13b4dbe4bcb809d4473e51d3e0914f561 Mon Sep 17 00:00:00 2001
 +From: Michael Fladischer <fladi at debian.org>
 +Date: Thu, 8 Oct 2015 08:58:55 -0700
- Subject: Skip tests the fail with spatialite.
++Subject: Skip tests that fail with spatialite.
 +
 +Last-Update: 2015-08-31
 +Forwarded: no
 +Patch-Name: skip_tests_spatialite.patch
 +---
-  tests/django_restframework_gis_tests/test_filters.py | 6 +++++-
-  1 file changed, 5 insertions(+), 1 deletion(-)
++ tests/django_restframework_gis_tests/test_filters.py | 7 ++++++-
++ 1 file changed, 6 insertions(+), 1 deletion(-)
 +
 +diff --git a/tests/django_restframework_gis_tests/test_filters.py b/tests/django_restframework_gis_tests/test_filters.py
- index 5f255c5..0691f00 100644
++index 5f255c5..ae96b6c 100644
 +--- a/tests/django_restframework_gis_tests/test_filters.py
 ++++ b/tests/django_restframework_gis_tests/test_filters.py
- @@ -1,13 +1,14 @@
++@@ -1,13 +1,15 @@
 + import json
 + import urllib
 + 
+++from unittest import skipIf
+++
 ++from django.conf import settings
 + from django.test import TestCase
- +from django.utils.unittest import skipIf
 + from django.contrib.gis.geos import GEOSGeometry, Polygon
 + from django.core.urlresolvers import reverse
 + 
 + from .models import Location
 + 
 +-
 + class TestRestFrameworkGisFilters(TestCase):
 +     """
 +     unit tests for filters feature in restframework_gis
- @@ -71,6 +72,7 @@ class TestRestFrameworkGisFilters(TestCase):
++@@ -71,6 +73,7 @@ class TestRestFrameworkGisFilters(TestCase):
 +         for result in response.data['features']:
 +             self.assertEqual(result['properties']['name'] in ('isContained', 'isEqualToBounds', 'overlaps'), True)
 + 
 ++    @skipIf(settings.DATABASES['default']['ENGINE'] == 'django.contrib.gis.db.backends.spatialite', 'Spatialite detected')
 +     def test_TileFilter_filtering(self):
 +         """
 +         Checks that the TMSTileFilter returns only objects strictly contained
- @@ -120,6 +122,7 @@ class TestRestFrameworkGisFilters(TestCase):
++@@ -120,6 +123,7 @@ class TestRestFrameworkGisFilters(TestCase):
 +         for result in response.data['features']:
 +             self.assertEqual(result['properties']['name'] in ('isContained', 'isEqualToBounds', 'overlaps'), True)
 + 
 ++    @skipIf(settings.DATABASES['default']['ENGINE'] == 'django.contrib.gis.db.backends.spatialite', 'Spatialite detected')
 +     def test_DistanceToPointFilter_filtering(self):
 +         """
 +         Checks that the DistancFilter returns only objects within the given distance of the
- @@ -259,6 +262,7 @@ class TestRestFrameworkGisFilters(TestCase):
++@@ -259,6 +263,7 @@ class TestRestFrameworkGisFilters(TestCase):
 +         for result in response.data['features']:
 +             self.assertEqual(result['properties']['name'] in (treasure_island.name), True)
 + 
 ++    @skipIf(settings.DATABASES['default']['ENGINE'] == 'django.contrib.gis.db.backends.spatialite', 'Spatialite detected')
 +     def test_GeometryField_filtering(self):
 +         """ Checks that the GeometryField allows sane filtering. """
 +         self.assertEqual(Location.objects.count(), 0)
diff --cc debian/patches/spatialite.patch
index 5d0c28b,0000000..d9b1168
mode 100644,000000..100644
--- a/debian/patches/spatialite.patch
+++ b/debian/patches/spatialite.patch
@@@ -1,54 -1,0 +1,54 @@@
- From d88722fb615cec96b71a747f7e83740b6d23a5e9 Mon Sep 17 00:00:00 2001
++From 276b90a8e70110125e94b2ed8e591308f35abdc2 Mon Sep 17 00:00:00 2001
 +From: Michael Fladischer <fladi at debian.org>
 +Date: Thu, 8 Oct 2015 08:58:54 -0700
 +Subject: Disable tests that only work with PostGIS
 +
 + 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
 +Last-Update: 2014-10-12
 +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