test_wsgi.py 文件源码

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

项目:Pardus-Bulut 作者: ferhatacikalin 项目源码 文件源码
def test_view(self):
        """ WSGI: Test view-decorator (should override autojson) """
        @bottle.route('/tpl')
        @bottle.view('stpl_t2main')
        def test():
            return dict(content='1234')
        result = '+base+\n+main+\n!1234!\n+include+\n-main-\n+include+\n-base-\n'
        self.assertHeader('Content-Type', 'text/html; charset=UTF-8', '/tpl')
        self.assertBody(result, '/tpl')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号