[Python-modules-commits] r34075 - in packages/djangorestframework-gis/trunk/debian/patches (2 files)
fladi at users.alioth.debian.org
fladi at users.alioth.debian.org
Tue Sep 1 05:41:12 UTC 2015
Date: Tuesday, September 1, 2015 @ 05:41:11
Author: fladi
Revision: 34075
Add skip_tests_spatialite.patch to skip unittests that are not supported by spatialite.
Added:
packages/djangorestframework-gis/trunk/debian/patches/skip_tests_spatialite.patch
Modified:
packages/djangorestframework-gis/trunk/debian/patches/series
Modified: packages/djangorestframework-gis/trunk/debian/patches/series
===================================================================
--- packages/djangorestframework-gis/trunk/debian/patches/series 2015-09-01 05:38:04 UTC (rev 34074)
+++ packages/djangorestframework-gis/trunk/debian/patches/series 2015-09-01 05:41:11 UTC (rev 34075)
@@ -1 +1,2 @@
spatialite.patch
+skip_tests_spatialite.patch
Added: packages/djangorestframework-gis/trunk/debian/patches/skip_tests_spatialite.patch
===================================================================
--- packages/djangorestframework-gis/trunk/debian/patches/skip_tests_spatialite.patch (rev 0)
+++ packages/djangorestframework-gis/trunk/debian/patches/skip_tests_spatialite.patch 2015-09-01 05:41:11 UTC (rev 34075)
@@ -0,0 +1,48 @@
+Description: Skip tests the fail with spatialite.
+Author: Michael Fladischer <fladi at debian.org>
+Last-Update: 2015-08-31
+Forwarded: no
+Index: djangorestframework-gis/tests/django_restframework_gis_tests/test_filters.py
+===================================================================
+--- djangorestframework-gis.orig/tests/django_restframework_gis_tests/test_filters.py 2015-03-03 11:54:39.000000000 +0100
++++ djangorestframework-gis/tests/django_restframework_gis_tests/test_filters.py 2015-08-31 20:18:02.423247707 +0200
+@@ -9,13 +9,14 @@
+
+
+ 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 TestRestFrameworkGis(TestCase):
+
+ def setUp(self):
+@@ -77,6 +78,7 @@
+ 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
+@@ -126,6 +128,7 @@
+ 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
+@@ -261,6 +264,7 @@
+ 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)
More information about the Python-modules-commits
mailing list