Skip to content
Browse files

Coverage for the fix for issue #149

  • Loading branch information...
1 parent 6673539 commit bdd9adc70e16fabb04aa1adcd5c487ec69b36054 @ppaez committed
Showing with 11 additions and 0 deletions.
  1. +11 −0 deform/tests/test_widget.py
View
11 deform/tests/test_widget.py
@@ -1206,6 +1206,17 @@ def test_prototype_unicode(self):
self.assertEqual(url_unquote(result), 'abc')
self.assertEqual(protofield.cloned, True)
+ def test_prototype_field_has_no_name(self):
+ from deform.compat import url_unquote
+ renderer = DummyRenderer(text_type('abc'))
+ schema = DummySchema()
+ field = DummyField(schema, renderer)
+ widget = self._makeOne()
+ protofield = DummyField(None, renderer)
+ protofield.name = ''
+ field.children=[protofield]
+ self.assertRaises(ValueError, widget.prototype, field)
+
def test_prototype_str(self):
from deform.compat import url_unquote
renderer = DummyRenderer('abc')

0 comments on commit bdd9adc

Please sign in to comment.
Something went wrong with that request. Please try again.