          # Check if the max_length attribute has been inherited from the model.
          f = TextFileForm(
              data={'description': 'Assistance'},
              files={'file': SimpleUploadedFile('test-maxlength.txt', b'hello world')})
          self.assertEqual(f.is_valid(), False)
  
          # Edit an instance that already has the file defined in the model. This will not
          # save the file again, but leave it exactly as it is.
  
          f = TextFileForm(
 
</s> remove         self.assertEqual(f.is_valid(), True)
 </s> add         self.assertTrue(f.is_valid()) </s> remove         self.assertEqual(f.is_valid(), True)
 </s> add         self.assertTrue(f.is_valid()) </s> remove         self.assertEqual(f.is_valid(), True)
        instance = f.save()
        self.assertEqual(instance.file.name, 'tests/test2.txt')

        # Delete the current file since this is not done by Django.
        instance.file.delete()
        f = TextFileForm(
            data={'description': 'Assistance'},
            files={'file': SimpleUploadedFile('test2.txt', b'hello world')})
        self.assertEqual(f.is_valid(), True)
 </s> add         self.assertTrue(f.is_valid()) </s> remove         self.assertEqual(f.is_valid(), False)
 </s> add         self.assertFalse(f.is_valid())
        self.assertFalse(f.is_valid())
          # Check if the max_length attribute has been inherited from the model.
          f = TextFileForm(
              data={'description': 'Assistance'},
              files={'file': SimpleUploadedFile('test-maxlength.txt', b'hello world')})
        self.assertFalse(f.is_valid())
  
          # Edit an instance that already has the file defined in the model. This will not
          # save the file again, but leave it exactly as it is.
  
          f = TextFileForm(
keep keep keep keep replace keep keep keep keep keep
 Fixed #6103 -- Splitted tests in model_forms tests 
tests/model_forms/tests.py