          f.save_m2m()
          self.assertQuerysetEqual(new_art.categories.order_by('name'),
              ["Entertainment", "It's a test"])
  
          # Here, we define a custom ModelForm. Because it happens to have the same fields as
          # the Category model, we can just call the form's save() to apply its changes to an
          # existing Category instance.
          class ShortCategory(forms.ModelForm):
              name = forms.CharField(max_length=5)
              slug = forms.CharField(max_length=5)
 
</s> remove         self.assertQuerysetEqual(new_art.categories.order_by('name'), ["Entertainment", "It's a test"])
 </s> add         self.assertQuerysetEqual(new_art.categories.order_by('name'),
            ["Entertainment", "It's a test"]) </s> remove         cat = Category.objects.get(name='Third test')
        self.assertEqual(cat.name, "Third test")
        self.assertEqual(cat.id == c3.id, True)
 </s> add         class ShortCategory(forms.ModelForm):
            name = forms.CharField(max_length=5)
            slug = forms.CharField(max_length=5)
            url = forms.CharField(max_length=3)

            class Meta:
                model = Category
                fields = '__all__'

        cat = Category.objects.create(name='Third test') </s> remove class ShortCategory(forms.ModelForm):
    name = forms.CharField(max_length=5)
    slug = forms.CharField(max_length=5)
    url = forms.CharField(max_length=3)

    class Meta:
        model = Category
        fields = '__all__'


class ImprovedArticleForm(forms.ModelForm):
    class Meta:
        model = ImprovedArticle
        fields = '__all__'


class ImprovedArticleWithParentLinkForm(forms.ModelForm):
    class Meta:
        model = ImprovedArticleWithParentLink
        fields = '__all__'


class BetterWriterForm(forms.ModelForm):
    class Meta:
        model = BetterWriter
        fields = '__all__'


class WriterProfileForm(forms.ModelForm):
    class Meta:
        model = WriterProfile
        fields = '__all__'


 </s> add  </s> remove         self.assertEqual(Category.objects.count(), 1)

        f = BaseCategoryForm({'name': "It's a test",
                              'slug': 'its-test',
                              'url': 'test'})
        self.assertTrue(f.is_valid())
        self.assertEqual(f.cleaned_data['name'], "It's a test")
        self.assertEqual(f.cleaned_data['slug'], 'its-test')
        self.assertEqual(f.cleaned_data['url'], 'test')
        c2 = f.save()
        # Testing wether the same object is returned from the
        # ORM... not the fastest way...
        self.assertEqual(c2, Category.objects.get(pk=c2.pk))
        self.assertEqual(c2.name, "It's a test")
        self.assertEqual(Category.objects.count(), 2)
 </s> add 
    def test_custom_form_fields(self):
          f.save_m2m()
          self.assertQuerysetEqual(new_art.categories.order_by('name'),
              ["Entertainment", "It's a test"])
  
    def test_custom_form_fields(self):
          # Here, we define a custom ModelForm. Because it happens to have the same fields as
          # the Category model, we can just call the form's save() to apply its changes to an
          # existing Category instance.
          class ShortCategory(forms.ModelForm):
              name = forms.CharField(max_length=5)
              slug = forms.CharField(max_length=5)
keep keep keep add keep keep keep keep keep keep
 Fixed #6103 -- Splitted tests in model_forms tests 
tests/model_forms/tests.py