[Python-modules-commits] [djangorestframework-gis] 04/05: Skip tests the fail with spatialite.
Brian May
bam at moszumanska.debian.org
Fri Oct 23 08:54:22 UTC 2015
This is an automated email from the git hooks/post-receive script.
bam pushed a commit to branch master
in repository djangorestframework-gis.
commit 2c5b47b35b4c11ca0ed296cf644d7f4a7ccc8a55
Author: Michael Fladischer <fladi at debian.org>
Date: Thu Oct 8 08:58:55 2015 -0700
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)
--
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