          self.assertIsNone(f.clean(None, None))
  
      def test_integerfield_raises_error_on_empty_input(self):
          f = models.IntegerField(null=False)
          self.assertRaises(ValidationError, f.clean, None, None)
          self.assertRaises(ValidationError, f.clean, '', None)
  
      def test_integerfield_validates_zero_against_choices(self):
          f = models.IntegerField(choices=((1, 1),))
          self.assertRaises(ValidationError, f.clean, '0', 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)
 </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) </s> remove         self.assertRaises(ValidationError, f.clean, None, None)
 </s> add         with self.assertRaises(ValidationError):
            f.clean(None, None)
        with self.assertRaises(ValidationError):
            f.clean(None, None)
        with self.assertRaises(ValidationError):
            f.clean('', None)
          self.assertIsNone(f.clean(None, None))
  
      def test_integerfield_raises_error_on_empty_input(self):
          f = models.IntegerField(null=False)
        with self.assertRaises(ValidationError):
            f.clean(None, None)
        with self.assertRaises(ValidationError):
            f.clean('', None)
        with self.assertRaises(ValidationError):
            f.clean(None, None)
        with self.assertRaises(ValidationError):
            f.clean('', None)
  
      def test_integerfield_validates_zero_against_choices(self):
          f = models.IntegerField(choices=((1, 1),))
          self.assertRaises(ValidationError, f.clean, '0', None)
  
keep keep keep keep replace replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/model_fields/tests.py