

def on_template_response(self, context, **kwargs):
    'Run TemplateResponse with given context through decorated view.'
    request = kwargs.setdefault('request', RequestFactory().get('/'))
    res = TemplateResponse(request, 'some/template.html', context)
    return self.on_response(res, **kwargs)

dataset/ETHPy150Open mozilla/moztrap/tests/view/lists/test_sort.py SortDecoratorTest.on_template_response/original