          """
          We can't determine if STATICFILES_DIRS is set correctly just by
          looking at the type, but we can determine if it's definitely wrong.
          """
          self.assertRaises(ImproperlyConfigured, finders.FileSystemFinder)
  
      @override_settings(MEDIA_ROOT='')
      def test_location_empty(self):
          self.assertRaises(ImproperlyConfigured, finders.DefaultStorageFinder)
 
</s> remove         self.assertRaises(ImproperlyConfigured, finders.DefaultStorageFinder)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            finders.DefaultStorageFinder() </s> remove         self.assertRaises(ImproperlyConfigured, Sitemap().get_urls)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            Sitemap().get_urls() </s> remove         self.assertRaises(ImproperlyConfigured,
                          self.client.get,
                          '/syndication/articles/')
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.client.get('/syndication/articles/') </s> remove         self.assertRaises(ImproperlyConfigured, Sitemap().get_urls)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            Sitemap().get_urls() </s> remove         self.assertRaises(ImproperlyConfigured, view.get_template_names)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            view.get_template_names()
        with self.assertRaises(ImproperlyConfigured):
            finders.FileSystemFinder()
          """
          We can't determine if STATICFILES_DIRS is set correctly just by
          looking at the type, but we can determine if it's definitely wrong.
          """
        with self.assertRaises(ImproperlyConfigured):
            finders.FileSystemFinder()
  
      @override_settings(MEDIA_ROOT='')
      def test_location_empty(self):
          self.assertRaises(ImproperlyConfigured, finders.DefaultStorageFinder)
keep keep keep keep replace keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/staticfiles_tests/test_finders.py