diff options
| author | Brian Rosner <brosner@gmail.com> | 2008-06-10 04:15:06 +0000 |
|---|---|---|
| committer | Brian Rosner <brosner@gmail.com> | 2008-06-10 04:15:06 +0000 |
| commit | 1fd3db4ab0d603878104877960de496773d12ad2 (patch) | |
| tree | f52f6bdc858a9eb25233190f5d50da390a3ee165 /tests/regressiontests | |
| parent | 4530a408c40647c195f27f81da1315e98e956f96 (diff) | |
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
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/inline_formsets/models.py | 12 |
1 files changed, 6 insertions, 6 deletions
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: <class 'regressiontests.inline_formsets.models.Child'> has more than 1 ForeignKey to <class 'regressiontests.inline_formsets.models.Parent'> @@ -29,14 +29,14 @@ Exception: <class 'regressiontests.inline_formsets.models.Child'> 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 <class 'regressiontests.inline_formsets.models.Parent'> @@ -45,7 +45,7 @@ Exception: fk_name 'school' is not a ForeignKey to <class 'regressiontests.inlin If the field specified in fk_name is not a ForeignKey, we should get an exception. ->>> ifs = _inlineformset_factory(Parent, Child, fk_name='test') +>>> ifs = inlineformset_factory(Parent, Child, fk_name='test') Traceback (most recent call last): ... Exception: <class 'regressiontests.inline_formsets.models.Child'> has no field named 'test' |
