From 7a125f30a1f8a393ef29d861d4acc00245d05710 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 24 Sep 2012 23:46:00 -0400 Subject: [PATCH] fix failing tests after fix for #79 --- deform/tests/test_widget.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deform/tests/test_widget.py b/deform/tests/test_widget.py index a54cbccd..0746316e 100644 --- a/deform/tests/test_widget.py +++ b/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']