tests.py 文件源码

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

项目:swjtu-pyscraper 作者: Desgard 项目源码 文件源码
def test_adding(self):
        # adding two strings should escape the unsafe one
        unsafe = '<script type="application/x-some-script">alert("foo");</script>'
        safe = Markup('<em>username</em>')
        assert unsafe + safe == text_type(escape(unsafe)) + text_type(safe)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号