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')
评论列表
文章目录