From 1fd3db4ab0d603878104877960de496773d12ad2 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Tue, 10 Jun 2008 04:15:06 +0000 Subject: newforms-admin: Removed the leading underscore from modelforms factory functions. git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7605 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/inline_formsets/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/regressiontests/inline_formsets/models.py') diff --git a/tests/regressiontests/inline_formsets/models.py b/tests/regressiontests/inline_formsets/models.py index 6f197d6ab5..b22f5e297d 100644 --- a/tests/regressiontests/inline_formsets/models.py +++ b/tests/regressiontests/inline_formsets/models.py @@ -15,13 +15,13 @@ class Child(models.Model): __test__ = {'API_TESTS': """ ->>> from django.newforms.models import _inlineformset_factory +>>> from django.newforms.models import inlineformset_factory Child has two ForeignKeys to Parent, so if we don't specify which one to use for the inline formset, we should get an exception. ->>> ifs = _inlineformset_factory(Parent, Child) +>>> ifs = inlineformset_factory(Parent, Child) Traceback (most recent call last): ... Exception: has more than 1 ForeignKey to @@ -29,14 +29,14 @@ Exception: has more than These two should both work without a problem. ->>> ifs = _inlineformset_factory(Parent, Child, fk_name='mother') ->>> ifs = _inlineformset_factory(Parent, Child, fk_name='father') +>>> ifs = inlineformset_factory(Parent, Child, fk_name='mother') +>>> ifs = inlineformset_factory(Parent, Child, fk_name='father') If we specify fk_name, but it isn't a ForeignKey from the child model to the parent model, we should get an exception. ->>> ifs = _inlineformset_factory(Parent, Child, fk_name='school') +>>> ifs = inlineformset_factory(Parent, Child, fk_name='school') Traceback (most recent call last): ... Exception: fk_name 'school' is not a ForeignKey to @@ -45,7 +45,7 @@ Exception: fk_name 'school' is not a ForeignKey to >> ifs = _inlineformset_factory(Parent, Child, fk_name='test') +>>> ifs = inlineformset_factory(Parent, Child, fk_name='test') Traceback (most recent call last): ... Exception: has no field named 'test' -- cgit v1.3