  <tr><th>Pub date:</th><td><input type="text" name="pub_date" /></td></tr>''')
  
          # You can create a form over a subset of the available fields
          # by specifying a 'fields' argument to form_for_instance.
          f = PartialArticleFormWithSlug({
              'headline': 'New headline',
              'slug': 'new-headline',
              'pub_date': '1988-01-04'
          }, auto_id=False, instance=art)
 
</s> remove </select></li>''' % (w_woodward.pk, w_royko.pk, c1.pk, c2.pk, c3.pk))
        f = TestArticleForm({
            'headline': 'Test headline',
            'slug': 'test-headline',
            'pub_date': '1984-02-06',
            'writer': six.text_type(w_royko.pk),
            'article': 'Hello.'
        }, instance=art)
        self.assertEqual(f.errors, {})
        self.assertEqual(f.is_valid(), True)
        test_art = f.save()
        self.assertEqual(test_art.id == art_id_1, True)
        test_art = Article.objects.get(id=art_id_1)
        self.assertEqual(test_art.headline, 'Test headline')
 </s> add </select></li>''' % (self.w_woodward.pk, self.w_royko.pk, self.c1.pk, self.c2.pk, self.c3.pk))

    def test_subset_fields(self):
        # You can restrict a form to a subset of the complete list of fields
        # by providing a 'fields' argument. If you try to save a
        # model created with such a form, you need to ensure that the fields
        # that are _not_ on the form have default values, or are allowed to have
        # a value of None. If a field isn't specified on a form, the object created
        # from the form can't provide a value for that field!
        class PartialArticleForm(forms.ModelForm):
            class Meta:
                model = Article
                fields = ('headline', 'pub_date')

        f = PartialArticleForm(auto_id=False)
        self.assertHTMLEqual(six.text_type(f), '''<tr><th>Headline:</th><td><input type="text" name="headline" maxlength="50" /></td></tr>
<tr><th>Pub date:</th><td><input type="text" name="pub_date" /></td></tr>''')
 </s> remove </select></td></tr>''' % (w_woodward.pk, w_royko.pk, c1.pk, c2.pk, c3.pk))

        # You can restrict a form to a subset of the complete list of fields
        # by providing a 'fields' argument. If you try to save a
        # model created with such a form, you need to ensure that the fields
        # that are _not_ on the form have default values, or are allowed to have
        # a value of None. If a field isn't specified on a form, the object created
        # from the form can't provide a value for that field!
        f = PartialArticleForm(auto_id=False)
        self.assertHTMLEqual(six.text_type(f), '''<tr><th>Headline:</th><td><input type="text" name="headline" maxlength="50" /></td></tr>
<tr><th>Pub date:</th><td><input type="text" name="pub_date" /></td></tr>''')
 </s> add </select></td></tr>''' % (self.w_woodward.pk, self.w_royko.pk, self.c1.pk, self.c2.pk, self.c3.pk)) </s> remove             'writer': six.text_type(w_royko.pk),
 </s> add             'writer': six.text_type(self.w_royko.pk), </s> remove         self.assertEqual(new_art.id == art_id_1, True)
        new_art = Article.objects.get(id=art_id_1)
 </s> add         new_art = Article.objects.get(id=new_art.id)
        art_id_1 = new_art.id </s> remove         self.assertEqual(f.is_valid(), True)
 </s> add         self.assertTrue(f.is_valid())
        class PartialArticleFormWithSlug(forms.ModelForm):
            class Meta:
                model = Article
                fields = ('headline', 'slug', 'pub_date')

        w_royko = Writer.objects.create(name='Mike Royko')
        art = Article.objects.create(
            article="Hello.", headline="New headline", slug="new-headline",
            pub_date=datetime.date(1988, 1, 4), writer=w_royko)
  <tr><th>Pub date:</th><td><input type="text" name="pub_date" /></td></tr>''')
  
          # You can create a form over a subset of the available fields
          # by specifying a 'fields' argument to form_for_instance.
        class PartialArticleFormWithSlug(forms.ModelForm):
            class Meta:
                model = Article
                fields = ('headline', 'slug', 'pub_date')

        w_royko = Writer.objects.create(name='Mike Royko')
        art = Article.objects.create(
            article="Hello.", headline="New headline", slug="new-headline",
            pub_date=datetime.date(1988, 1, 4), writer=w_royko)
          f = PartialArticleFormWithSlug({
              'headline': 'New headline',
              'slug': 'new-headline',
              'pub_date': '1988-01-04'
          }, auto_id=False, instance=art)
keep keep keep add keep keep keep keep keep
 Fixed #6103 -- Splitted tests in model_forms tests 
tests/model_forms/tests.py