@@ -102,7 +102,9 @@ def test_render_not_initialized(loop):
102
102
103
103
@asyncio .coroutine
104
104
def func (request ):
105
- return aiohttp_jinja2 .render_template ('template' , request , {})
105
+ response = yield from aiohttp_jinja2 .render_template (
106
+ 'template' , request , {})
107
+ return response
106
108
107
109
app = web .Application (loop = loop )
108
110
@@ -145,9 +147,10 @@ def test_render_template(app_with_template, test_client):
145
147
146
148
@asyncio .coroutine
147
149
def func (request ):
148
- return aiohttp_jinja2 .render_template (
150
+ response = yield from aiohttp_jinja2 .render_template (
149
151
'tmpl.jinja2' , request ,
150
152
{'head' : 'HEAD' , 'text' : 'text' })
153
+ return response
151
154
152
155
template = '<html><body><h1>{{head}}</h1>{{text}}</body></html>'
153
156
@@ -168,9 +171,10 @@ def test_render_template_custom_status(app_with_template, test_client):
168
171
169
172
@asyncio .coroutine
170
173
def func (request ):
171
- return aiohttp_jinja2 .render_template (
174
+ response = yield from aiohttp_jinja2 .render_template (
172
175
'tmpl.jinja2' , request ,
173
176
{'head' : 'HEAD' , 'text' : 'text' }, status = 404 )
177
+ return response
174
178
175
179
template = '<html><body><h1>{{head}}</h1>{{text}}</body></html>'
176
180
@@ -191,7 +195,9 @@ def test_template_not_found(loop):
191
195
192
196
@asyncio .coroutine
193
197
def func (request ):
194
- return aiohttp_jinja2 .render_template ('template' , request , {})
198
+ response = yield from aiohttp_jinja2 .render_template (
199
+ 'template' , request , {})
200
+ return response
195
201
196
202
app = web .Application (loop = loop )
197
203
aiohttp_jinja2 .setup (app , loader = jinja2 .DictLoader ({}))
0 commit comments