diff --git a/tests/modeltests/model_formsets/models.py b/tests/modeltests/model_formsets/models.py index a5738ab1ac4..5ce4797e20e 100644 --- a/tests/modeltests/model_formsets/models.py +++ b/tests/modeltests/model_formsets/models.py @@ -254,19 +254,20 @@ used. True >>> formset.save() [] +>>> hemingway_id = BetterAuthor.objects.get(name="Ernest Hemingway").pk >>> formset = BetterAuthorFormSet() >>> for form in formset.forms: ... print form.as_p()

-

+

>>> data = { ... 'form-TOTAL_FORMS': '2', # the number of forms rendered ... 'form-INITIAL_FORMS': '1', # the number of forms with initial data -... 'form-0-author_ptr_id': '4', +... 'form-0-author_ptr_id': hemingway_id, ... 'form-0-name': 'Ernest Hemingway', ... 'form-0-write_speed': '10', ... 'form-1-author_ptr_id': '',