def test_conflicting_custom_routes_in_subclass(self):
class BaseController(object):
@expose(route='testing')
def foo(self):
return request.path
class ChildController(BaseController):
pass
class RootController(BaseController):
child = ChildController()
app = TestApp(Pecan(RootController()))
r = app.get('/testing/')
assert r.body == b_('/testing/')
r = app.get('/child/testing/')
assert r.body == b_('/child/testing/')
评论列表
文章目录