summaryrefslogtreecommitdiff
path: root/tests/regressiontests/inline_formsets
diff options
context:
space:
mode:
authorBrian Rosner <brosner@gmail.com>2008-06-10 04:15:06 +0000
committerBrian Rosner <brosner@gmail.com>2008-06-10 04:15:06 +0000
commit1fd3db4ab0d603878104877960de496773d12ad2 (patch)
treef52f6bdc858a9eb25233190f5d50da390a3ee165 /tests/regressiontests/inline_formsets
parent4530a408c40647c195f27f81da1315e98e956f96 (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/inline_formsets')
-rw-r--r--tests/regressiontests/inline_formsets/models.py12
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'