Fixed a regression from e23a5f9a47.

Excluded postgis specific gis tests from other spatial databases.

Refs #17365, #17366, #18727.
This commit is contained in:
Florian Apolloner 2013-05-11 18:29:08 +02:00
parent e23a5f9a47
commit 2bf403ecbd
4 changed files with 11 additions and 11 deletions

View File

@ -5,7 +5,7 @@ from django.db.models import Q
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 @@ if HAS_GEOS and HAS_SPATIAL_DB:
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 File

@ -5,7 +5,7 @@ import re
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 @@ bbox_data = (
)
@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 File

@ -6,7 +6,7 @@ from django.db import connection
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 @@ class GeoModelTest(TestCase):
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 @@ class GeoLookupTest(TestCase):
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 File

@ -8,7 +8,7 @@ import os
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 @@ if HAS_GEOS:
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):