Moved imports in GIS tests to avoid failure if dependencies aren't installed.

This commit is contained in:
Tim Graham 2015-01-23 16:03:30 -05:00
parent 1cd41874d5
commit 1e219ac62f
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 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

View File

@ -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