summaryrefslogtreecommitdiff
path: root/tests/model_formsets
diff options
context:
space:
mode:
authorchillaranand <anand21nanda@gmail.com>2017-01-21 18:43:44 +0530
committerTim Graham <timograham@gmail.com>2017-01-25 12:23:46 -0500
commitd6eaf7c0183cd04b78f2a55e1d60bb7e59598310 (patch)
treeab02fd9949d4bfa23e27dea45e213ce334c883f0 /tests/model_formsets
parentdc165ec8e5698ffc6dee6b510f1f92c9fd7467fe (diff)
downloaddjango-d6eaf7c0183cd04b78f2a55e1d60bb7e59598310.tar.gz
Refs #23919 -- Replaced super(ClassName, self) with super().
Diffstat (limited to 'tests/model_formsets')
-rw-r--r--tests/model_formsets/tests.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/model_formsets/tests.py b/tests/model_formsets/tests.py
index 832dbe63ee..3873cb3b27 100644
--- a/tests/model_formsets/tests.py
+++ b/tests/model_formsets/tests.py
@@ -454,7 +454,7 @@ class ModelFormsetTest(TestCase):
class PoetForm(forms.ModelForm):
def save(self, commit=True):
# change the name to "Vladimir Mayakovsky" just to be a jerk.
- author = super(PoetForm, self).save(commit=False)
+ author = super().save(commit=False)
author.name = "Vladimir Mayakovsky"
if commit:
author.save()
@@ -513,7 +513,7 @@ class ModelFormsetTest(TestCase):
class BaseAuthorFormSet(BaseModelFormSet):
def __init__(self, *args, **kwargs):
- super(BaseAuthorFormSet, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self.queryset = Author.objects.filter(name__startswith='Charles')
AuthorFormSet = modelformset_factory(Author, fields='__all__', formset=BaseAuthorFormSet)
@@ -864,7 +864,7 @@ class ModelFormsetTest(TestCase):
class PoemForm(forms.ModelForm):
def save(self, commit=True):
# change the name to "Brooklyn Bridge" just to be a jerk.
- poem = super(PoemForm, self).save(commit=False)
+ poem = super().save(commit=False)
poem.name = "Brooklyn Bridge"
if commit:
poem.save()
@@ -995,7 +995,7 @@ class ModelFormsetTest(TestCase):
"""
class PoemForm2(forms.ModelForm):
def save(self, commit=True):
- poem = super(PoemForm2, self).save(commit=False)
+ poem = super().save(commit=False)
poem.name = "%s by %s" % (poem.name, poem.poet.name)
if commit:
poem.save()
@@ -1413,7 +1413,7 @@ class ModelFormsetTest(TestCase):
fields = "__all__"
def __init__(self, **kwargs):
- super(MembershipForm, self).__init__(**kwargs)
+ super().__init__(**kwargs)
self.fields['date_joined'].widget = forms.SplitDateTimeWidget()
FormSet = inlineformset_factory(