Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix failing tests after fix for #79

  • Loading branch information...
commit 7a125f30a1f8a393ef29d861d4acc00245d05710 1 parent db9364c
@mcdonc mcdonc authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 deform/tests/test_widget.py
View
8 deform/tests/test_widget.py
@@ -1199,7 +1199,7 @@ def test_prototype_unicode(self):
schema = DummySchema()
field = DummyField(schema, renderer)
widget = self._makeOne()
- protofield = DummyField()
+ protofield = DummyField(None, renderer)
field.children=[protofield]
result = widget.prototype(field)
self.assertEqual(type(result), str)
@@ -1212,7 +1212,7 @@ def test_prototype_str(self):
schema = DummySchema()
field = DummyField(schema, renderer)
widget = self._makeOne()
- protofield = DummyField()
+ protofield = DummyField(None, renderer)
field.children=[protofield]
result = widget.prototype(field)
self.assertEqual(type(result), str)
@@ -1792,6 +1792,7 @@ class DummyField(object):
cloned = False
oid = 'deformField1'
required = True
+ cstruct = colander.null
def __init__(self, schema=None, renderer=None, translations=None):
self.schema = schema
self.renderer = renderer
@@ -1809,6 +1810,9 @@ def translate(self, term):
return term
return self.translations.get(term, term)
+ def render_template(self, template, **kw):
+ return self.renderer(template, **kw)
+
class DummyTmpStore(dict):
def preview_url(self, uid):
return 'http://localhost/%s' % self[uid]['filename']
Please sign in to comment.
Something went wrong with that request. Please try again.