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