                              data={'myfile-clear': 'true'})
          self.assertTrue(not form.is_valid())
          self.assertEqual(form.errors['myfile'],
                           ['Please either submit a file or check the clear checkbox, not both.'])
          rendered = six.text_type(form)
          self.assertIn('something.txt', rendered)
          self.assertIn('myfile-clear', rendered)
  
      def test_render_empty_file_field(self):
          class DocumentForm(forms.ModelForm):
 
</s> remove         self.assertIn('myfile-clear', six.text_type(form))
 </s> add         self.assertIn('myfile-clear', str(form)) </s> remove     if isinstance(file_h, six.string_types):
 </s> add     if isinstance(file_h, str): </s> remove         if isinstance(connection, six.string_types):
 </s> add         if isinstance(connection, str): </s> remove         rel_is_string = isinstance(self.remote_field.model, six.string_types)
 </s> add         rel_is_string = isinstance(self.remote_field.model, str) </s> remove         if isinstance(ds_input, six.string_types):
 </s> add         if isinstance(ds_input, str):
        rendered = str(form)
                              data={'myfile-clear': 'true'})
          self.assertTrue(not form.is_valid())
          self.assertEqual(form.errors['myfile'],
                           ['Please either submit a file or check the clear checkbox, not both.'])
        rendered = str(form)
          self.assertIn('something.txt', rendered)
          self.assertIn('myfile-clear', rendered)
  
      def test_render_empty_file_field(self):
          class DocumentForm(forms.ModelForm):
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
tests/model_forms/tests.py