diff --git a/django/contrib/gis/tests/geoapp/test_regress.py b/django/contrib/gis/tests/geoapp/test_regress.py index 85dc1c139a..60dbe5e56d 100644 --- a/django/contrib/gis/tests/geoapp/test_regress.py +++ b/django/contrib/gis/tests/geoapp/test_regress.py @@ -3,7 +3,6 @@ from __future__ import unicode_literals from datetime import datetime -from django.contrib.gis.db.models import Extent from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.shortcuts import render_to_kmz 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 if HAS_GEOS: + from django.contrib.gis.db.models import Extent from .models import City, PennsylvaniaCity, State, Truth diff --git a/django/contrib/gis/tests/geoapp/tests.py b/django/contrib/gis/tests/geoapp/tests.py index 31a2694421..8a885b2827 100644 --- a/django/contrib/gis/tests/geoapp/tests.py +++ b/django/contrib/gis/tests/geoapp/tests.py @@ -5,7 +5,6 @@ from tempfile import NamedTemporaryFile from django.db import connection 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.tests.utils import no_oracle, oracle, postgis, spatialite from django.core.management import call_command @@ -14,6 +13,7 @@ from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning if HAS_GEOS: + from django.contrib.gis.db.models import Extent, MakeLine, Union from django.contrib.gis.geos import (fromstr, GEOSGeometry, Point, LineString, LinearRing, Polygon, GeometryCollection) from .models import Country, City, PennsylvaniaCity, State, Track, NonConcreteModel, Feature, MinusOneSRID