summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2015-11-19 08:58:13 +0500
committerTim Graham <timograham@gmail.com>2015-11-19 08:53:21 -0500
commit3eaf37af3c04cc1dd5a05cbbe809590bd509c541 (patch)
treeae630895f7160dd963c839fb83d66046d3a2ae87
parent5fa7b592b3f43282823045954c61a1f9a4b31a7f (diff)
Allowed RasterFieldWithoutGDALTest to run even if GDAL is installed.
-rw-r--r--tests/gis_tests/rasterapp/test_rasterfield.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gis_tests/rasterapp/test_rasterfield.py b/tests/gis_tests/rasterapp/test_rasterfield.py
index 03691ef0b3..4dbe019602 100644
--- a/tests/gis_tests/rasterapp/test_rasterfield.py
+++ b/tests/gis_tests/rasterapp/test_rasterfield.py
@@ -1,10 +1,10 @@
import json
-from unittest import skipIf
-from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.shortcuts import numpy
from django.core.exceptions import ImproperlyConfigured
-from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature
+from django.test import (
+ TestCase, TransactionTestCase, mock, skipUnlessDBFeature,
+)
from ..data.rasters.textrasters import JSON_RASTER
from ..models import models
@@ -90,7 +90,7 @@ class RasterFieldTest(TransactionTestCase):
)
-@skipIf(HAS_GDAL, 'Test raster field exception on systems without GDAL.')
+@mock.patch('django.contrib.gis.db.models.fields.HAS_GDAL', False)
class RasterFieldWithoutGDALTest(TestCase):
def test_raster_field_without_gdal_exception(self):