          self.assertRaises(ValidationError, f.clean, '0', None)
  
      def test_charfield_raises_error_on_empty_input(self):
          f = models.CharField(null=False)
          self.assertRaises(ValidationError, f.clean, None, None)
  
      def test_datefield_cleans_date(self):
          f = models.DateField()
          self.assertEqual(datetime.date(2008, 10, 10), f.clean('2008-10-10', None))
  
 
</s> remove         self.assertRaises(ValidationError, f.clean, '0', None)
 </s> add         with self.assertRaises(ValidationError):
            f.clean('0', None) </s> remove         self.assertRaises(ValidationError, f.clean, None, None)
 </s> add         with self.assertRaises(ValidationError):
            f.clean(None, None) </s> remove         self.assertRaises(ValidationError, f.clean, None, None)
        self.assertRaises(ValidationError, f.clean, '', None)
 </s> add         with self.assertRaises(ValidationError):
            f.clean(None, None)
        with self.assertRaises(ValidationError):
            f.clean('', None) </s> remove         self.assertRaises(ValidationError, f.clean, None, None)
 </s> add         with self.assertRaises(ValidationError):
            f.clean(None, None) </s> remove         self.assertRaises(ValidationError, f.clean, "", None)
 </s> add         with self.assertRaises(ValidationError):
            f.clean("", None)
        with self.assertRaises(ValidationError):
            f.clean(None, None)
          self.assertRaises(ValidationError, f.clean, '0', None)
  
      def test_charfield_raises_error_on_empty_input(self):
          f = models.CharField(null=False)
        with self.assertRaises(ValidationError):
            f.clean(None, None)
  
      def test_datefield_cleans_date(self):
          f = models.DateField()
          self.assertEqual(datetime.date(2008, 10, 10), f.clean('2008-10-10', None))
  
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/model_fields/tests.py