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:
parent
54bfa4caab
commit
9ab798a8d8
|
@ -3,7 +3,6 @@ import unittest
|
||||||
from django.contrib.gis.gdal import HAS_GDAL
|
from django.contrib.gis.gdal import HAS_GDAL
|
||||||
from django.contrib.gis.tests.utils import (no_mysql, oracle, postgis,
|
from django.contrib.gis.tests.utils import (no_mysql, oracle, postgis,
|
||||||
spatialite, HAS_SPATIALREFSYS, SpatialRefSys)
|
spatialite, HAS_SPATIALREFSYS, SpatialRefSys)
|
||||||
from django.contrib.gis.utils import add_srs_entry
|
|
||||||
from django.db import connection
|
from django.db import connection
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
|
|
||||||
|
@ -109,6 +108,8 @@ class SpatialRefSysTest(unittest.TestCase):
|
||||||
Test adding a new entry in the SpatialRefSys model using the
|
Test adding a new entry in the SpatialRefSys model using the
|
||||||
add_srs_entry utility.
|
add_srs_entry utility.
|
||||||
"""
|
"""
|
||||||
|
from django.contrib.gis.utils import add_srs_entry
|
||||||
|
|
||||||
add_srs_entry(900913)
|
add_srs_entry(900913)
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
SpatialRefSys.objects.filter(srid=900913).exists()
|
SpatialRefSys.objects.filter(srid=900913).exists()
|
||||||
|
|
Loading…
Reference in New Issue