test_monkey.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:deb-python-jingo 作者: openstack 项目源码 文件源码
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 = six.text_type(form['email'])
    eq_(s, render('{{ form.email }}', {'form': form}))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号