[Python-modules-commits] [djangorestframework-gis] 05/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 f74b4e49f143807e68ed5795c3a8feb550b2ec9c
Merge: 9e41749 aa6647a
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Fri Dec 11 11:56:14 2015 +0100

    merge patched into master

 .travis.yml                                | 21 ++++-------------
 CHANGES.rst                                |  5 ++++
 README.rst                                 | 37 +++++++++++++++---------------
 debian/.git-dpm                            |  6 ++---
 debian/patches/skip_tests_spatialite.patch |  2 +-
 debian/patches/spatialite.patch            |  2 +-
 requirements-test.txt                      |  2 +-
 requirements.txt                           |  2 +-
 rest_framework_gis/__init__.py             | 26 +--------------------
 rest_framework_gis/apps.py                 |  8 +------
 rest_framework_gis/fields.py               |  3 +--
 rest_framework_gis/pagination.py           |  4 ++--
 rest_framework_gis/serializers.py          |  3 ++-
 rest_framework_gis/utils.py                |  5 ----
 setup.py                                   |  1 -
 tests/urls.py                              | 11 +++++----
 16 files changed, 48 insertions(+), 90 deletions(-)

diff --cc debian/.git-dpm
index 4815d0a,0000000..24a1a5a
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
- 55a6a84500d2026871b3b29b0183528476b9912f
- 55a6a84500d2026871b3b29b0183528476b9912f
- 1a7f03a322870cd1700e0998393401fe27e0ce76
++aa6647a3c12066737026058e668b31cdc9dc22a6
++aa6647a3c12066737026058e668b31cdc9dc22a6
++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 1b49da7,0000000..b43fcd8
mode 100644,000000..100644
--- a/debian/patches/skip_tests_spatialite.patch
+++ b/debian/patches/skip_tests_spatialite.patch
@@@ -1,56 -1,0 +1,56 @@@
- From 55a6a84500d2026871b3b29b0183528476b9912f Mon Sep 17 00:00:00 2001
++From aa6647a3c12066737026058e668b31cdc9dc22a6 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.
 +
 +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(-)
 +
 +diff --git a/tests/django_restframework_gis_tests/test_filters.py b/tests/django_restframework_gis_tests/test_filters.py
 +index 5f255c5..0691f00 100644
 +--- a/tests/django_restframework_gis_tests/test_filters.py
 ++++ b/tests/django_restframework_gis_tests/test_filters.py
 +@@ -1,13 +1,14 @@
 + import json
 + import urllib
 + 
 ++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):
 +         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):
 +         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):
 +         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 f918064,0000000..5d0c28b
mode 100644,000000..100644
--- a/debian/patches/spatialite.patch
+++ b/debian/patches/spatialite.patch
@@@ -1,54 -1,0 +1,54 @@@
- From 36e57659256c3da99dcd9e0d307bcff40fa7d7c7 Mon Sep 17 00:00:00 2001
++From d88722fb615cec96b71a747f7e83740b6d23a5e9 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