'TemplateResponses returned from process_view() must be rendered before
being passed to any middleware that tries to access response.content,
such as middleware_exceptions.middleware.LogMiddleware.'

@override_settings(MIDDLEWARE=['middleware_exceptions.middleware.ProcessViewTemplateResponseMiddleware', 'middleware_exceptions.middleware.LogMiddleware'])
def test_templateresponse_from_process_view_rendered(self):

    response = self.client.get('/middleware_exceptions/view/')
    self.assertEqual(response.content, 'Processed    view    normal_view\nProcessViewTemplateResponseMiddleware')
