Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a regression from e23a5f9.

Excluded postgis specific gis tests from other spatial databases.

Refs #17365, #17366, #18727.
  • Loading branch information...
commit 2bf403ecbd958bfb269794b36e61b69f0aede4cf 1 parent e23a5f9
@apollo13 apollo13 authored
View
6 django/contrib/gis/tests/distapp/tests.py
@@ -5,7 +5,7 @@
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.measure import D # alias for Distance
from django.contrib.gis.tests.utils import (
- HAS_SPATIAL_DB, oracle, postgis, spatialite, no_oracle, no_spatialite
+ HAS_SPATIAL_DB, mysql, oracle, postgis, spatialite, no_oracle, no_spatialite
)
from django.test import TestCase
from django.utils.unittest import skipUnless
@@ -17,8 +17,8 @@
SouthTexasCity, SouthTexasCityFt, CensusZipcode, SouthTexasZipcode)
-@skipUnless(HAS_GEOS and HAS_SPATIAL_DB,
- "Geos and spatial db are required.")
+@skipUnless(HAS_GEOS and HAS_SPATIAL_DB and not mysql,
+ "Geos and spatial db (not mysql) are required.")
class DistanceTest(TestCase):
if HAS_GEOS and HAS_SPATIAL_DB:
View
4 django/contrib/gis/tests/geo3d/tests.py
@@ -5,7 +5,7 @@
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geos import HAS_GEOS
-from django.contrib.gis.tests.utils import HAS_SPATIAL_DB
+from django.contrib.gis.tests.utils import postgis
from django.test import TestCase
from django.utils._os import upath
from django.utils.unittest import skipUnless
@@ -62,7 +62,7 @@
)
-@skipUnless(HAS_GEOS and HAS_GDAL and HAS_SPATIAL_DB, "Geos, GDAL and spatial db are required.")
+@skipUnless(HAS_GEOS and HAS_GDAL and postgis, "Geos, GDAL and postgis are required.")
class Geo3DTest(TestCase):
"""
Only a subset of the PostGIS routines are 3D-enabled, and this TestCase
View
8 django/contrib/gis/tests/geoapp/tests.py
@@ -6,7 +6,7 @@
from django.contrib.gis import gdal
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import (
- HAS_SPATIAL_DB, no_mysql, no_oracle, no_spatialite,
+ no_mysql, no_oracle, no_spatialite,
mysql, oracle, postgis, spatialite)
from django.test import TestCase
from django.utils import six, unittest
@@ -27,7 +27,7 @@ def postgis_bug_version():
return spatial_version and (2, 0, 0) <= spatial_version <= (2, 0, 1)
-@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
+@skipUnless(HAS_GEOS and postgis, "Geos and postgis are required.")
class GeoModelTest(TestCase):
def test_fixtures(self):
@@ -202,7 +202,7 @@ def test_raw_sql_query(self):
self.assertTrue(isinstance(cities2[0].point, Point))
-@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
+@skipUnless(HAS_GEOS and postgis, "Geos and postgis are required.")
class GeoLookupTest(TestCase):
@no_mysql
@@ -388,7 +388,7 @@ def test_relate_lookup(self):
self.assertEqual('Lawrence', City.objects.get(point__relate=(ks.poly, intersects_mask)).name)
-@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
+@skipUnless(HAS_GEOS and postgis, "Geos and postgis are required.")
class GeoQuerySetTest(TestCase):
# Please keep the tests in GeoQuerySet method's alphabetic order
View
4 django/contrib/gis/tests/geogapp/tests.py
@@ -8,7 +8,7 @@
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.measure import D
-from django.contrib.gis.tests.utils import HAS_SPATIAL_DB
+from django.contrib.gis.tests.utils import postgis
from django.test import TestCase
from django.utils._os import upath
from django.utils.unittest import skipUnless
@@ -17,7 +17,7 @@
from .models import City, County, Zipcode
-@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
+@skipUnless(HAS_GEOS and postgis, "Geos and postgis are required.")
class GeographyTest(TestCase):
def test01_fixture_load(self):
Please sign in to comment.
Something went wrong with that request. Please try again.