summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/gis_tests/test_geoforms.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/gis_tests/test_geoforms.py b/tests/gis_tests/test_geoforms.py
index 0360156b50..74c082e59d 100644
--- a/tests/gis_tests/test_geoforms.py
+++ b/tests/gis_tests/test_geoforms.py
@@ -374,10 +374,14 @@ class OSMWidgetTest(SimpleTestCase):
class GeometryWidgetTests(SimpleTestCase):
def test_get_context_attrs(self):
- """The Widget.get_context() attrs argument overrides self.attrs."""
+ # The Widget.get_context() attrs argument overrides self.attrs.
widget = BaseGeometryWidget(attrs={'geom_type': 'POINT'})
context = widget.get_context('point', None, attrs={'geom_type': 'POINT2'})
self.assertEqual(context['geom_type'], 'POINT2')
+ # Widget.get_context() returns expected name for geom_type.
+ widget = BaseGeometryWidget(attrs={'geom_type': 'POLYGON'})
+ context = widget.get_context('polygon', None, None)
+ self.assertEqual(context['geom_type'], 'Polygon')
def test_subwidgets(self):
widget = forms.BaseGeometryWidget()