  
      def test_no_model_class(self):
          class NoModelModelForm(forms.ModelForm):
              pass
          self.assertRaises(ValueError, NoModelModelForm)
  
      def test_empty_fields_to_fields_for_model(self):
          """
          An argument of fields=() to fields_for_model should return an empty dictionary
          """
 
</s> remove         self.assertRaises(ImproperlyConfigured, self.site.register, Location)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.site.register(Location) </s> remove         self.assertRaises(ImportError, get_storage_class,
                          'django.core.files.storage.NonExistingStorage')
 </s> add         with self.assertRaises(ImportError):
            get_storage_class('django.core.files.storage.NonExistingStorage') </s> remove         self.assertRaises(ImproperlyConfigured, Sitemap().get_urls)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            Sitemap().get_urls() </s> remove         self.assertRaises(TypeError, delattr, settings, '_wrapped')
 </s> add         with self.assertRaises(TypeError):
            delattr(settings, '_wrapped') </s> remove         self.assertRaises(CommandError, management.call_command, ('explode',))
 </s> add         with self.assertRaises(CommandError):
            management.call_command(('explode',))
        with self.assertRaises(ValueError):
            NoModelModelForm()
  
      def test_no_model_class(self):
          class NoModelModelForm(forms.ModelForm):
              pass
        with self.assertRaises(ValueError):
            NoModelModelForm()
  
      def test_empty_fields_to_fields_for_model(self):
          """
          An argument of fields=() to fields_for_model should return an empty dictionary
          """
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/model_forms/tests.py