def app_(self):
class RootController(object):
@expose()
def redirect_with_context(self):
request.context['foo'] = 'bar'
redirect('/testing')
@expose()
def internal_with_context(self):
request.context['foo'] = 'bar'
redirect('/testing', internal=True)
@expose('json')
def testing(self):
return request.context
return TestApp(make_app(RootController(), debug=False))
评论列表
文章目录