diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/gdal_tests/test_geom.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/gis_tests/gdal_tests/test_geom.py b/tests/gis_tests/gdal_tests/test_geom.py index 9d62bcd07b..13e7d3e70d 100644 --- a/tests/gis_tests/gdal_tests/test_geom.py +++ b/tests/gis_tests/gdal_tests/test_geom.py @@ -11,6 +11,7 @@ from django.contrib.gis.gdal import ( from django.template import Context from django.template.engine import Engine from django.test import SimpleTestCase +from django.utils.deprecation import RemovedInDjango60Warning from ..test_data import TestDataMixin @@ -810,3 +811,12 @@ class OGRGeomTest(SimpleTestCase, TestDataMixin): g = OGRGeometry(geom) self.assertEqual(g.wkt, geom) self.assertEqual(g.wkb.hex(), wkb) + + +class DeprecationTests(SimpleTestCase): + def test_coord_setter_deprecation(self): + geom = OGRGeometry("POINT (1 2)") + msg = "coord_dim setter is deprecated. Use set_3d() instead." + with self.assertWarnsMessage(RemovedInDjango60Warning, msg): + geom.coord_dim = 3 + self.assertEqual(geom.coord_dim, 3) |
