  
          f = TextFileForm(data={'description': 'Assistance'})
          self.assertEqual(f.is_valid(), False)
          f = TextFileForm(data={'description': 'Assistance'}, files={})
          self.assertEqual(f.is_valid(), False)
  
          # Upload a file and ensure it all works as expected.
  
          f = TextFileForm(
              data={'description': 'Assistance'},
 
</s> remove         self.assertEqual(f.is_valid(), False)
 </s> add         self.assertFalse(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(), False)
 </s> add         self.assertFalse(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())
        self.assertFalse(f.is_valid())
  
          f = TextFileForm(data={'description': 'Assistance'})
          self.assertEqual(f.is_valid(), False)
          f = TextFileForm(data={'description': 'Assistance'}, files={})
        self.assertFalse(f.is_valid())
  
          # Upload a file and ensure it all works as expected.
  
          f = TextFileForm(
              data={'description': 'Assistance'},
keep keep keep keep replace keep keep keep keep keep
 Fixed #6103 -- Splitted tests in model_forms tests 
tests/model_forms/tests.py