diff options
author | Daniel Wiesmann <daniel.wiesmann@gmail.com> | 2016-05-27 17:43:17 +0100 |
---|---|---|
committer | Daniel Wiesmann <daniel.wiesmann@gmail.com> | 2016-05-27 17:43:17 +0100 |
commit | 9bb1b4b7f6b79096fc7418c3b7bb0118d44c373a (patch) | |
tree | c30b07efc4a8a4d9c501e609060fe57a46f1079c /tests/gis_tests/gis_migrations/test_operations.py | |
parent | 0e7e47b5d7123441efc03545da59a6cd581c04b1 (diff) | |
download | django-9bb1b4b7f6b79096fc7418c3b7bb0118d44c373a.tar.gz |
Refs #25588 -- Fixed GDAL dependency in spatial lookups.
Diffstat (limited to 'tests/gis_tests/gis_migrations/test_operations.py')
-rw-r--r-- | tests/gis_tests/gis_migrations/test_operations.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/gis_tests/gis_migrations/test_operations.py b/tests/gis_tests/gis_migrations/test_operations.py index aa6b13bdda..a6f89e6106 100644 --- a/tests/gis_tests/gis_migrations/test_operations.py +++ b/tests/gis_tests/gis_migrations/test_operations.py @@ -1,6 +1,9 @@ from __future__ import unicode_literals +from unittest import skipUnless + from django.contrib.gis.db.models import fields +from django.contrib.gis.gdal import HAS_GDAL from django.core.exceptions import ImproperlyConfigured from django.db import connection, migrations, models from django.db.migrations.migration import Migration @@ -114,6 +117,7 @@ class OperationTests(TransactionTestCase): self.assertSpatialIndexExists('gis_neighborhood', 'heatmap') @skipIfDBFeature('supports_raster') + @skipUnless(HAS_GDAL, 'A different error is raised if GDAL is not installed.') def test_create_raster_model_on_db_without_raster_support(self): """ Test creating a model with a raster field on a db without raster support. @@ -123,6 +127,7 @@ class OperationTests(TransactionTestCase): self.set_up_test_model(True) @skipIfDBFeature('supports_raster') + @skipUnless(HAS_GDAL, 'A different error is raised if GDAL is not installed.') def test_add_raster_field_on_db_without_raster_support(self): """ Test adding a raster field on a db without raster support. |