      def test_get_nonexisting_storage_class(self):
          """
          get_storage_class raises an error if the requested class don't exist.
          """
          self.assertRaises(ImportError, get_storage_class,
                            'django.core.files.storage.NonExistingStorage')
  
      def test_get_nonexisting_storage_module(self):
          """
          get_storage_class raises an error if the requested module don't exist.
          """
 
</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(ImportError, serializers.deserialize, "yaml", "")
 </s> add         with self.assertRaises(ImportError):
            serializers.deserialize("yaml", "") </s> remove         self.assertRaises(ImproperlyConfigured, Sitemap().get_urls)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            Sitemap().get_urls() </s> remove         self.assertRaises(CommandError, management.call_command, ('explode',))
 </s> add         with self.assertRaises(CommandError):
            management.call_command(('explode',)) </s> remove         self.assertRaises(TypeError, CustomizableView.as_view, foobar="value")
 </s> add         with self.assertRaises(TypeError):
            CustomizableView.as_view(foobar="value")
        with self.assertRaises(ImportError):
            get_storage_class('django.core.files.storage.NonExistingStorage')
      def test_get_nonexisting_storage_class(self):
          """
          get_storage_class raises an error if the requested class don't exist.
          """
        with self.assertRaises(ImportError):
            get_storage_class('django.core.files.storage.NonExistingStorage')
        with self.assertRaises(ImportError):
            get_storage_class('django.core.files.storage.NonExistingStorage')
  
      def test_get_nonexisting_storage_module(self):
          """
          get_storage_class raises an error if the requested module don't exist.
          """
keep keep keep keep replace replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/file_storage/tests.py