diff options
| author | Tim Graham <timograham@gmail.com> | 2017-04-20 11:36:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-20 11:36:40 -0400 |
| commit | d2cb7a2bc11f111be04a29b5e4f92a183b18ba88 (patch) | |
| tree | 041ae42efc9fb8056c4d0b2aecb975a454a29b99 /tests | |
| parent | 6d7cbe67f0a91ce3c576b41dc5650e1e4cdbd4e2 (diff) | |
Fixed #28039 -- Fixed crash in BaseGeometryWidget.subwidgets().
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/test_geoforms.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/gis_tests/test_geoforms.py b/tests/gis_tests/test_geoforms.py index 473cf13913..73521bc2e6 100644 --- a/tests/gis_tests/test_geoforms.py +++ b/tests/gis_tests/test_geoforms.py @@ -351,7 +351,27 @@ class OSMWidgetTest(SimpleTestCase): @skipUnlessDBFeature("gis_enabled") -class CustomGeometryWidgetTest(SimpleTestCase): +class GeometryWidgetTests(SimpleTestCase): + + def test_subwidgets(self): + widget = forms.BaseGeometryWidget() + self.assertEqual( + list(widget.subwidgets('name', 'value')), + [{ + 'is_hidden': False, + 'attrs': { + 'map_srid': 4326, + 'map_width': 600, + 'geom_type': 'GEOMETRY', + 'map_height': 400, + 'display_raw': False, + }, + 'name': 'name', + 'template_name': '', + 'value': 'value', + 'required': False, + }] + ) def test_custom_serialization_widget(self): class CustomGeometryWidget(forms.BaseGeometryWidget): |
