diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-09-14 06:04:12 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-09-18 22:12:40 +0200 |
| commit | 7433237664e9a942d6584b4e70fd6a5174cf8f39 (patch) | |
| tree | c49b8f77204f2fa3e23272b19040a71d3a7f2cfc /tests | |
| parent | 04eb1b4567c96ccb167c16a95ca12c336b0c791b (diff) | |
Refs #33924 -- Removed BaseGeometryWidget.map_height/map_width attributes per deprecation timeline.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/test_geoforms.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/gis_tests/test_geoforms.py b/tests/gis_tests/test_geoforms.py index b8105645bf..c351edaaad 100644 --- a/tests/gis_tests/test_geoforms.py +++ b/tests/gis_tests/test_geoforms.py @@ -5,7 +5,6 @@ from django.contrib.gis.forms import BaseGeometryWidget, OpenLayersWidget from django.contrib.gis.geos import GEOSGeometry from django.core.exceptions import ValidationError from django.test import SimpleTestCase, override_settings -from django.utils.deprecation import RemovedInDjango51Warning from django.utils.html import escape @@ -445,9 +444,7 @@ class GeometryWidgetTests(SimpleTestCase): "is_hidden": False, "attrs": { "map_srid": 4326, - "map_width": 600, "geom_type": "GEOMETRY", - "map_height": 400, "display_raw": False, }, "name": "name", @@ -486,19 +483,3 @@ class GeometryWidgetTests(SimpleTestCase): form = PointForm(data={"p": point.json}) self.assertTrue(form.is_valid()) self.assertEqual(form.cleaned_data["p"].srid, 4326) - - def test_deprecated_width_and_height(self): - class CustomGeometryWidget(forms.BaseGeometryWidget): - map_height = 300 - map_width = 550 - - msg = ( - "The map_height and map_width widget attributes are deprecated. Please use " - "CSS to size map widgets." - ) - with self.assertRaisesMessage(RemovedInDjango51Warning, msg): - CustomGeometryWidget() - with self.assertRaisesMessage(RemovedInDjango51Warning, msg): - forms.BaseGeometryWidget({"map_width": 400}) - with self.assertRaisesMessage(RemovedInDjango51Warning, msg): - forms.BaseGeometryWidget({"map_height": 600}) |
