mirror of
https://github.com/django/django.git
synced 2025-03-28 02:00:45 +00:00
[1.6.x] Partial revert of commit 2bf403ecbd95
Homework: write 100 times geoapp is not geogapp. Backport of 57815e2630 from master.
This commit is contained in:
parent
c1b24b09f4
commit
e2c1e9ef55
@ -6,7 +6,7 @@ from django.db import connection
|
|||||||
from django.contrib.gis import gdal
|
from django.contrib.gis import gdal
|
||||||
from django.contrib.gis.geos import HAS_GEOS
|
from django.contrib.gis.geos import HAS_GEOS
|
||||||
from django.contrib.gis.tests.utils import (
|
from django.contrib.gis.tests.utils import (
|
||||||
no_mysql, no_oracle, no_spatialite,
|
HAS_SPATIAL_DB, no_mysql, no_oracle, no_spatialite,
|
||||||
mysql, oracle, postgis, spatialite)
|
mysql, oracle, postgis, spatialite)
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.utils import six, unittest
|
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)
|
return spatial_version and (2, 0, 0) <= spatial_version <= (2, 0, 1)
|
||||||
|
|
||||||
|
|
||||||
@skipUnless(HAS_GEOS and postgis, "Geos and postgis are required.")
|
@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
|
||||||
class GeoModelTest(TestCase):
|
class GeoModelTest(TestCase):
|
||||||
|
|
||||||
def test_fixtures(self):
|
def test_fixtures(self):
|
||||||
@ -202,7 +202,7 @@ class GeoModelTest(TestCase):
|
|||||||
self.assertTrue(isinstance(cities2[0].point, Point))
|
self.assertTrue(isinstance(cities2[0].point, Point))
|
||||||
|
|
||||||
|
|
||||||
@skipUnless(HAS_GEOS and postgis, "Geos and postgis are required.")
|
@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
|
||||||
class GeoLookupTest(TestCase):
|
class GeoLookupTest(TestCase):
|
||||||
|
|
||||||
@no_mysql
|
@no_mysql
|
||||||
@ -388,7 +388,7 @@ class GeoLookupTest(TestCase):
|
|||||||
self.assertEqual('Lawrence', City.objects.get(point__relate=(ks.poly, intersects_mask)).name)
|
self.assertEqual('Lawrence', City.objects.get(point__relate=(ks.poly, intersects_mask)).name)
|
||||||
|
|
||||||
|
|
||||||
@skipUnless(HAS_GEOS and postgis, "Geos and postgis are required.")
|
@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
|
||||||
class GeoQuerySetTest(TestCase):
|
class GeoQuerySetTest(TestCase):
|
||||||
# Please keep the tests in GeoQuerySet method's alphabetic order
|
# Please keep the tests in GeoQuerySet method's alphabetic order
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user