mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #26753 -- Made GDAL a required dependency for contrib.gis
Thanks Tim Graham for the review.
This commit is contained in:
parent
7def55c3f6
commit
f7a363ee1d
29 changed files with 117 additions and 368 deletions
|
@ -1,14 +1,10 @@
|
|||
from unittest import skipUnless
|
||||
|
||||
from django.contrib.gis import forms
|
||||
from django.contrib.gis.gdal import HAS_GDAL
|
||||
from django.contrib.gis.geos import GEOSGeometry
|
||||
from django.forms import ValidationError
|
||||
from django.test import SimpleTestCase, override_settings, skipUnlessDBFeature
|
||||
from django.utils.html import escape
|
||||
|
||||
|
||||
@skipUnless(HAS_GDAL, "GeometryFieldTest needs GDAL support")
|
||||
@skipUnlessDBFeature("gis_enabled")
|
||||
class GeometryFieldTest(SimpleTestCase):
|
||||
|
||||
|
@ -89,7 +85,6 @@ class GeometryFieldTest(SimpleTestCase):
|
|||
self.assertFalse(form.has_changed())
|
||||
|
||||
|
||||
@skipUnless(HAS_GDAL, "SpecializedFieldTest needs GDAL support")
|
||||
@skipUnlessDBFeature("gis_enabled")
|
||||
class SpecializedFieldTest(SimpleTestCase):
|
||||
def setUp(self):
|
||||
|
@ -260,7 +255,6 @@ class SpecializedFieldTest(SimpleTestCase):
|
|||
self.assertFalse(GeometryForm(data={'g': invalid.wkt}).is_valid())
|
||||
|
||||
|
||||
@skipUnless(HAS_GDAL, "OSMWidgetTest needs GDAL support")
|
||||
@skipUnlessDBFeature("gis_enabled")
|
||||
class OSMWidgetTest(SimpleTestCase):
|
||||
def setUp(self):
|
||||
|
@ -302,7 +296,6 @@ class OSMWidgetTest(SimpleTestCase):
|
|||
rendered)
|
||||
|
||||
|
||||
@skipUnless(HAS_GDAL, "CustomGeometryWidgetTest needs GDAL support")
|
||||
@skipUnlessDBFeature("gis_enabled")
|
||||
class CustomGeometryWidgetTest(SimpleTestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue