          template, it still tells you it's ImproperlyConfigured instead of
          TemplateDoesNotExist.
          """
          view = views.TemplateResponseWithoutTemplate()
          self.assertRaises(ImproperlyConfigured, view.get_template_names)
 
</s> remove         self.assertRaises(TemplateDoesNotExist, self.client.get, '/render_no_template/')
 </s> add         with self.assertRaises(TemplateDoesNotExist):
            self.client.get('/render_no_template/') </s> remove         self.assertRaises(FieldError, Poll.objects.get,
            choice__name__exact="This is the answer")
 </s> add         with self.assertRaises(FieldError):
            Poll.objects.get(choice__name__exact="This is the answer") </s> remove         self.assertRaises(ImproperlyConfigured, self.client.get, '/template/no_template/')
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.client.get('/template/no_template/') </s> remove         self.assertRaises(ImproperlyConfigured, Sitemap().get_urls)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            Sitemap().get_urls() </s> remove         self.assertRaises(ImproperlyConfigured, finders.FileSystemFinder)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            finders.FileSystemFinder()
        with self.assertRaises(ImproperlyConfigured):
            view.get_template_names()
          template, it still tells you it's ImproperlyConfigured instead of
          TemplateDoesNotExist.
          """
          view = views.TemplateResponseWithoutTemplate()
        with self.assertRaises(ImproperlyConfigured):
            view.get_template_names()
keep keep keep keep replace
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/generic_views/test_base.py