test_viewconfig.py 文件源码

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

项目:websauna 作者: websauna 项目源码 文件源码
def setup_wsgi():
    configurator = Configurator()

    configurator.include("pyramid_jinja2")
    configurator.add_jinja2_renderer('.html')
    configurator.add_jinja2_search_path('websauna.tests:templates/viewconfig', name='.html')

    configurator.add_route("parent_hello", "/parent_hello")
    configurator.add_route("child_hello", "/child_hello")

    from websauna.tests.viewconfig import testmodule
    configurator.set_root_factory(testmodule.Root)
    configurator.scan(testmodule)

    wsgi = TestApp(configurator.make_wsgi_app())
    return wsgi
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号