'Test that all methods of middleware are called for TemplateResponses in
the right sequence.'

def test_full_dec_templateresponse(self):

    @full_dec
    def template_response_view(request):
        t = Template('Hello    world')
        return TemplateResponse(request, t, {})
    request = self.rf.get('/')
    response = template_response_view(request)
    self.assertTrue(getattr(request, 'process_request_reached', False))
    self.assertTrue(getattr(request, 'process_view_reached', False))
    self.assertTrue(getattr(request, 'process_template_response_reached', False))
    self.assertFalse(response._is_rendered)
    self.assertFalse(getattr(request, 'process_response_reached', False))
    response.render()
    self.assertTrue(getattr(request, 'process_response_reached', False))
    self.assertEqual(request.process_response_content, 'Hello    world')
