From 1ee18a60460d192953fbd1e8c9b7a75aac5d0bd0 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 23 Jan 2015 16:03:30 -0500 Subject: [PATCH] [1.8.x] Moved imports in GIS tests to avoid failure if dependencies aren't installed. Backport of 1e219ac62f3313f5a5f8eb188240a11bedd41aa1 from master --- django/contrib/gis/tests/geoapp/test_regress.py | 2 +- django/contrib/gis/tests/geoapp/tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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