def test_monkey_patch(): form = MyForm() html = form.as_ul() context = {'form': form} t = '{{ form.as_ul() }}' eq_(escape(html), render(t, context)) jingo.monkey.patch() eq_(html, render(t, context))
def test_monkey_patch(): form = MyForm() html = form.as_ul() context = {'form': form} t = '{{ form.as_ul() }}' eq_(escape(html), render(t, context)) jingo.monkey.patch() eq_(html, render(t, context)) s = unicode(form['email']) eq_(s, render('{{ form.email }}', {'form': form}))