mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
This commit is contained in:
@@ -104,8 +104,8 @@ class DeletionTests(TestCase):
|
||||
|
||||
def test_change_form_deletion_when_invalid(self):
|
||||
"""
|
||||
Make sure that a change form that is filled out, but marked for deletion
|
||||
doesn't cause validation errors.
|
||||
Make sure that a change form that is filled out, but marked for
|
||||
deletion doesn't cause validation errors.
|
||||
"""
|
||||
PoetFormSet = modelformset_factory(Poet, fields="__all__", can_delete=True)
|
||||
poet = Poet.objects.create(name="test")
|
||||
@@ -1538,8 +1538,8 @@ class ModelFormsetTest(TestCase):
|
||||
],
|
||||
)
|
||||
|
||||
# unique_together with inlineformset_factory with overridden form fields
|
||||
# Also see #9494
|
||||
# unique_together with inlineformset_factory with overridden form
|
||||
# fields Also see #9494
|
||||
|
||||
FormSet = inlineformset_factory(
|
||||
Repository, Revision, fields=("revision",), extra=1
|
||||
@@ -1564,9 +1564,10 @@ class ModelFormsetTest(TestCase):
|
||||
)
|
||||
formset = FormSet(instance=person)
|
||||
|
||||
# Django will render a hidden field for model fields that have a callable
|
||||
# default. This is required to ensure the value is tested for change correctly
|
||||
# when determine what extra forms have changed to save.
|
||||
# Django will render a hidden field for model fields that have a
|
||||
# callable default. This is required to ensure the value is tested for
|
||||
# change correctly when determine what extra forms have changed to
|
||||
# save.
|
||||
|
||||
self.assertEqual(len(formset.forms), 1) # this formset only has one form
|
||||
form = formset.forms[0]
|
||||
@@ -1594,7 +1595,8 @@ class ModelFormsetTest(TestCase):
|
||||
'id="id_membership_set-0-id"></p>' % person.id,
|
||||
)
|
||||
|
||||
# test for validation with callable defaults. Validations rely on hidden fields
|
||||
# test for validation with callable defaults. Validations rely on
|
||||
# hidden fields
|
||||
|
||||
data = {
|
||||
"membership_set-TOTAL_FORMS": "1",
|
||||
@@ -1728,8 +1730,8 @@ class ModelFormsetTest(TestCase):
|
||||
)
|
||||
|
||||
def test_model_formset_with_custom_pk(self):
|
||||
# a formset for a Model that has a custom primary key that still needs to be
|
||||
# added to the formset automatically
|
||||
# a formset for a Model that has a custom primary key that still needs
|
||||
# to be added to the formset automatically
|
||||
FormSet = modelformset_factory(
|
||||
ClassyMexicanRestaurant, fields=["tacos_are_yummy"]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user