'Test that model_formset respects fields and exclude parameters of
custom form'

def test_custom_form(self):

    class PostForm1(forms.ModelForm, ):
        class Meta:
            model = Post
            fields = (u'title', u'posted')
    class PostForm2(forms.ModelForm, ):
        class Meta:
            model = Post
            exclude = (u'subtitle',)
    PostFormSet = modelformset_factory(Post, form=PostForm1)
    formset = PostFormSet()
    self.assertFalse((u'subtitle' in formset.forms[0].fields))
    PostFormSet = modelformset_factory(Post, form=PostForm2)
    formset = PostFormSet()
    self.assertFalse((u'subtitle' in formset.forms[0].fields))
