          self.assertEqual(tuple(field.choices), ((86, 'Apple'), (87, 'Core'), (22, 'Pear')))
          self.assertQuerysetEqual(field.clean([86]), ['Apple'])
  
          form = SelectInventoryForm({'items': [87, 22]})
          self.assertEqual(form.is_valid(), True)
          self.assertEqual(len(form.cleaned_data), 1)
          self.assertQuerysetEqual(form.cleaned_data['items'], ['Core', 'Pear'])
  
      def test_model_field_that_returns_none_to_exclude_itself_with_explicit_fields(self):
          self.assertEqual(list(CustomFieldForExclusionForm.base_fields),
 
</s> remove         self.assertEqual(form.is_valid(), True)
 </s> add         self.assertTrue(form.is_valid()) </s> remove         bw2.delete()
 </s> add         self.assertEqual(bw2.score, 12)

    def test_onetoonefield(self):
        class WriterProfileForm(forms.ModelForm):
            class Meta:
                # WriterProfile has a OneToOneField to Writer
                model = WriterProfile
                fields = '__all__'

        self.w_royko = Writer.objects.create(name='Mike Royko')
        self.w_woodward = Writer.objects.create(name='Bob Woodward') </s> remove         self.assertEqual(form.is_valid(), True)
 </s> add         self.assertTrue(form.is_valid()) </s> remove         bw = BetterWriter(name='Joe Better', score=10)
        bw.save()
 </s> add     def test_modelform_subclassed_model(self):
        class BetterWriterForm(forms.ModelForm):
            class Meta:
                # BetterWriter model is a subclass of Writer with an additional `score` field
                model = BetterWriter
                fields = '__all__'

        bw = BetterWriter.objects.create(name='Joe Better', score=10) </s> remove         self.assertEqual(form.is_valid(), True)
 </s> add         self.assertTrue(form.is_valid())
        self.assertTrue(form.is_valid())
          self.assertEqual(tuple(field.choices), ((86, 'Apple'), (87, 'Core'), (22, 'Pear')))
          self.assertQuerysetEqual(field.clean([86]), ['Apple'])
  
          form = SelectInventoryForm({'items': [87, 22]})
        self.assertTrue(form.is_valid())
          self.assertEqual(len(form.cleaned_data), 1)
          self.assertQuerysetEqual(form.cleaned_data['items'], ['Core', 'Pear'])
  
      def test_model_field_that_returns_none_to_exclude_itself_with_explicit_fields(self):
          self.assertEqual(list(CustomFieldForExclusionForm.base_fields),
keep keep keep keep replace keep keep keep keep keep
 Fixed #6103 -- Splitted tests in model_forms tests 
tests/model_forms/tests.py