def test_home_page_returns_correct_html(self):
    request = self.factory.get('/')
request.session = {}
view_func = SimpleView.as_view()
response = view_func(request)
response.render()
self.assertIn('<html>', response.content)
Manually get response from class-based generic view