Skip to content

Commit

Permalink
fix failing tests after fix for #79
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Sep 25, 2012
1 parent db9364c commit 7a125f3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions deform/tests/test_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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']
Expand Down

0 comments on commit 7a125f3

Please sign in to comment.