1
0
mirror of https://github.com/django/django.git synced 2024-12-28 12:06:22 +00:00

[1.8.x] Moved imports in GIS tests to avoid failure if dependencies aren't installed.

Backport of 1e219ac62f from master
This commit is contained in:
Tim Graham 2015-01-23 16:03:30 -05:00
parent 56015c01c4
commit 1ee18a6046
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,6 @@ from __future__ import unicode_literals
from datetime import datetime from datetime import datetime
from django.contrib.gis.db.models import Extent
from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.shortcuts import render_to_kmz from django.contrib.gis.shortcuts import render_to_kmz
from django.contrib.gis.tests.utils import no_oracle from django.contrib.gis.tests.utils import no_oracle
@ -11,6 +10,7 @@ from django.db.models import Count, Min
from django.test import TestCase, skipUnlessDBFeature from django.test import TestCase, skipUnlessDBFeature
if HAS_GEOS: if HAS_GEOS:
from django.contrib.gis.db.models import Extent
from .models import City, PennsylvaniaCity, State, Truth from .models import City, PennsylvaniaCity, State, Truth

View File

@ -5,7 +5,6 @@ from tempfile import NamedTemporaryFile
from django.db import connection from django.db import connection
from django.contrib.gis import gdal from django.contrib.gis import gdal
from django.contrib.gis.db.models import Extent, MakeLine, Union
from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import no_oracle, oracle, postgis, spatialite from django.contrib.gis.tests.utils import no_oracle, oracle, postgis, spatialite
from django.core.management import call_command from django.core.management import call_command
@ -14,6 +13,7 @@ from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning from django.utils.deprecation import RemovedInDjango20Warning
if HAS_GEOS: if HAS_GEOS:
from django.contrib.gis.db.models import Extent, MakeLine, Union
from django.contrib.gis.geos import (fromstr, GEOSGeometry, from django.contrib.gis.geos import (fromstr, GEOSGeometry,
Point, LineString, LinearRing, Polygon, GeometryCollection) Point, LineString, LinearRing, Polygon, GeometryCollection)
from .models import Country, City, PennsylvaniaCity, State, Track, NonConcreteModel, Feature, MinusOneSRID from .models import Country, City, PennsylvaniaCity, State, Track, NonConcreteModel, Feature, MinusOneSRID