1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Fixed #21930 -- Only import add_srs_entry if GDAL is installed

Fixed regression introduced by fabc678f93. Thanks Michael Manfre
for the report.
This commit is contained in:
Claude Paroz 2014-02-02 20:03:23 +01:00
parent 54bfa4caab
commit 9ab798a8d8

View File

@ -3,7 +3,6 @@ import unittest
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.tests.utils import (no_mysql, oracle, postgis,
spatialite, HAS_SPATIALREFSYS, SpatialRefSys)
from django.contrib.gis.utils import add_srs_entry
from django.db import connection
from django.utils import six
@ -109,6 +108,8 @@ class SpatialRefSysTest(unittest.TestCase):
Test adding a new entry in the SpatialRefSys model using the
add_srs_entry utility.
"""
from django.contrib.gis.utils import add_srs_entry
add_srs_entry(900913)
self.assertTrue(
SpatialRefSys.objects.filter(srid=900913).exists()