Example #1
0
 async def func(request):
     return aiohttp_tal.render_template('tmpl.pt',
                                        request, {
                                            'head': 'HEAD',
                                            'text': 'text'
                                        },
                                        status=404)
Example #2
0
 async def index(request):
     with pytest.raises(NameError, match="url"):
         aiohttp_tal.render_template('tmpl.pt', request, {})
     return web.Response()
Example #3
0
 async def index(request):
     with pytest.raises(TypeError,
                        match=(r"argument value should be str or int, "
                               r"got arg -> \[<class 'bool'>\] True")):
         aiohttp_tal.render_template('tmpl.pt', request, {})
     return web.Response()
Example #4
0
 async def index(request):
     with pytest.raises(RuntimeError, match='static_root_url'):
         aiohttp_tal.render_template('tmpl.pt', request, {})
     return web.Response()
Example #5
0
 async def func(request):
     return aiohttp_tal.render_template('template', request, None)