What I was saying was that when I showed this code to another core dev at
the sprints, the test failed prior to fixing the bug, and passed after
fixing it. I'm unsure what needs to be changed to make this a valid
regression test.

I'll continue to work on the tests until we can resolve the issue of
whether the bug fix should be done.


On Tue, Nov 12, 2013 at 9:46 AM, Tim Graham <notifications@github.com>wrote:

> In tests/admin_views/tests.py:
>
> > +        Verifying that if the parent form fails validation, the inlines also
> > +        run validation even if validation is contingent on parent form data
> > +        """
> > +        # The form validation should fail because 'some_required_info' is
> > +        # not included on the parent form, and the family_name of the parent
> > +        # does not match that of the child
> > +        post_data = {"family_name": "Test1",
> > +                     "dependentchild_set-TOTAL_FORMS": "1",
> > +                     "dependentchild_set-INITIAL_FORMS": "0",
> > +                     "dependentchild_set-MAX_NUM_FORMS": "1",
> > +                     "dependentchild_set-0-id": "",
> > +                     "dependentchild_set-0-parent": "",
> > +                     "dependentchild_set-0-family_name": "Test2"}
> > +        response = self.client.post('/test_admin/admin/admin_views/parentwithdependentchildren/add/',
> > +                                    post_data)
> > +        self.assertTrue(response.context['adminform'].form.errors)
>
> Ok, re: assertFormSetError. Left another comment about the test.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/django/django/pull/1590/files#r7597800>
> .
>