summaryrefslogtreecommitdiff
path: root/tests/forms_tests
diff options
context:
space:
mode:
authorantoliny0919 <antoliny0919@gmail.com>2024-11-17 11:25:44 +0900
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-11-20 11:36:33 +0100
commitf60d5e46e131b94d6ecc92b6891689ccc94bd1c9 (patch)
treeaf5c70212bc060117a20c58805f3721c79ad1fb6 /tests/forms_tests
parent4c452cc377f6f43acd90c6e54826ebd2e6219b0d (diff)
Fixed #35913 -- Prevented formset name suffix 'FormFormSet'.
Diffstat (limited to 'tests/forms_tests')
-rw-r--r--tests/forms_tests/tests/test_formsets.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/forms_tests/tests/test_formsets.py b/tests/forms_tests/tests/test_formsets.py
index f80c1dc09e..9f7012a11f 100644
--- a/tests/forms_tests/tests/test_formsets.py
+++ b/tests/forms_tests/tests/test_formsets.py
@@ -149,6 +149,12 @@ class FormsFormsetTestCase(SimpleTestCase):
self.assertFalse(formset.is_valid())
self.assertFalse(formset.has_changed())
+ def test_formset_name(self):
+ ArticleFormSet = formset_factory(ArticleForm)
+ ChoiceFormSet = formset_factory(Choice)
+ self.assertEqual(ArticleFormSet.__name__, "ArticleFormSet")
+ self.assertEqual(ChoiceFormSet.__name__, "ChoiceFormSet")
+
def test_form_kwargs_formset(self):
"""
Custom kwargs set on the formset instance are passed to the