mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #28039 -- Fixed crash in BaseGeometryWidget.subwidgets().
This commit is contained in:
parent
6d7cbe67f0
commit
d2cb7a2bc1
3 changed files with 26 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue