diff options
| author | Claude Paroz <claude@2xlibre.net> | 2016-06-14 16:18:33 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2016-06-18 10:58:02 +0200 |
| commit | f7a363ee1d2039824d95f35e54219e09c5af67b0 (patch) | |
| tree | d0d159c14a151f933faaa6eb0646679bdb614254 /tests/gis_tests/test_spatialrefsys.py | |
| parent | 7def55c3f6716fcfa40a3bd5d0fbb2090588d81e (diff) | |
Fixed #26753 -- Made GDAL a required dependency for contrib.gis
Thanks Tim Graham for the review.
Diffstat (limited to 'tests/gis_tests/test_spatialrefsys.py')
| -rw-r--r-- | tests/gis_tests/test_spatialrefsys.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/gis_tests/test_spatialrefsys.py b/tests/gis_tests/test_spatialrefsys.py index f576758016..652dab3130 100644 --- a/tests/gis_tests/test_spatialrefsys.py +++ b/tests/gis_tests/test_spatialrefsys.py @@ -1,8 +1,7 @@ import re import unittest -from django.contrib.gis.gdal import HAS_GDAL -from django.test import mock, skipUnlessDBFeature +from django.test import skipUnlessDBFeature from django.utils import six from .utils import SpatialRefSys, oracle, postgis, spatialite @@ -51,7 +50,6 @@ test_srs = ({ }) -@unittest.skipUnless(HAS_GDAL, "SpatialRefSysTest needs gdal support") @skipUnlessDBFeature("has_spatialrefsys_table") class SpatialRefSysTest(unittest.TestCase): @@ -61,13 +59,6 @@ class SpatialRefSysTest(unittest.TestCase): self.assertEqual(unit_name, 'degree') self.assertAlmostEqual(unit, 0.01745329251994328) - @mock.patch('django.contrib.gis.gdal.HAS_GDAL', False) - def test_get_units_without_gdal(self): - epsg_4326 = next(f for f in test_srs if f['srid'] == 4326) - unit, unit_name = SpatialRefSys().get_units(epsg_4326['wkt']) - self.assertEqual(unit_name, 'degree') - self.assertAlmostEqual(unit, 0.01745329251994328) - def test_retrieve(self): """ Test retrieval of SpatialRefSys model objects. |
