[Python-modules-commits] [djangorestframework-gis] 05/07: merge patched into master

Michael Fladischer fladi at moszumanska.debian.org
Wed Nov 4 10:01:38 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 335064bb60723de9f4ff58a3f28605f03fc01e94
Merge: f0736cc 55a6a84
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Wed Nov 4 09:40:24 2015 +0100

    merge patched into master

 .travis.yml                                        | 11 ++++-
 CHANGES.rst                                        |  9 +++++
 README.rst                                         | 13 +++---
 debian/.git-dpm                                    |  6 +--
 ...-the-coordinates-are-approximately-equal-.patch | 30 --------------
 debian/patches/series                              |  1 -
 debian/patches/skip_tests_spatialite.patch         |  2 +-
 debian/patches/spatialite.patch                    |  2 +-
 rest_framework_gis/__init__.py                     |  2 +-
 rest_framework_gis/serializers.py                  | 47 +++++++++++++---------
 setup.py                                           |  1 +
 tests/django_restframework_gis_tests/models.py     |  1 +
 .../django_restframework_gis_tests/serializers.py  | 20 +++++++--
 tests/django_restframework_gis_tests/tests.py      | 12 +++++-
 tests/django_restframework_gis_tests/urls.py       |  3 +-
 tests/django_restframework_gis_tests/views.py      | 14 +++++--
 16 files changed, 102 insertions(+), 72 deletions(-)

diff --cc debian/.git-dpm
index 5967d7e,0000000..306f541
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
- 2834b9b36468c8db67efca8e707a3104ceab4692
- 2834b9b36468c8db67efca8e707a3104ceab4692
- 2e7c34d49cd13f24cc87100cfbd73ffbbbbdc7bb
++55a6a84500d2026871b3b29b0183528476b9912f
++55a6a84500d2026871b3b29b0183528476b9912f
++1a7f03a322870cd1700e0998393401fe27e0ce76
 +1a7f03a322870cd1700e0998393401fe27e0ce76
 +djangorestframework-gis_0.9.6.orig.tar.gz
 +af0e4d5a197b82953ef86210ea3c2b0aca67f2b0
 +26385
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/series
index 66adfe7,0000000..767e08a
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,3 -1,0 +1,2 @@@
 +spatialite.patch
 +skip_tests_spatialite.patch
- 0003-Assert-that-the-coordinates-are-approximately-equal-.patch
diff --cc debian/patches/skip_tests_spatialite.patch
index 300c389,0000000..1b49da7
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 2c5b47b35b4c11ca0ed296cf644d7f4a7ccc8a55 Mon Sep 17 00:00:00 2001
++From 55a6a84500d2026871b3b29b0183528476b9912f 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 723b972,0000000..f918064
mode 100644,000000..100644
--- a/debian/patches/spatialite.patch
+++ b/debian/patches/spatialite.patch
@@@ -1,54 -1,0 +1,54 @@@
- From c583bbdc855e25c9c69f86b8e15c0aefb6b447da Mon Sep 17 00:00:00 2001
++From 36e57659256c3da99dcd9e0d307bcff40fa7d7c7 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