def root(self):
class RootController(object):
@expose()
def index(self, req, resp):
assert isinstance(req, webob.BaseRequest)
assert isinstance(resp, webob.Response)
return 'Hello, World!'
@expose()
def warning(self):
return ("This should be unroutable because (req, resp) are not"
" arguments. It should raise a TypeError.")
@expose(generic=True)
def generic(self):
return ("This should be unroutable because (req, resp) are not"
" arguments. It should raise a TypeError.")
@generic.when(method='PUT')
def generic_put(self, _id):
return ("This should be unroutable because (req, resp) are not"
" arguments. It should raise a TypeError.")
return RootController
test_no_thread_locals.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录