[Python-modules-commits] [djangorestframework-gis] 07/09: Skip tests that fail with spatialite.
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 886774f13b4dbe4bcb809d4473e51d3e0914f561
Author: Michael Fladischer <fladi at debian.org>
Date: Thu Oct 8 08:58:55 2015 -0700
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 | 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..ae96b6c 100644
--- a/tests/django_restframework_gis_tests/test_filters.py
+++ b/tests/django_restframework_gis_tests/test_filters.py
@@ -1,13 +1,15 @@
import json
import urllib
+from unittest import skipIf
+
+from django.conf import settings
from django.test import TestCase
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 +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 +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 +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)
--
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