summaryrefslogtreecommitdiff
path: root/tests/admin_views/customadmin.py
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/admin_views/customadmin.py
parentdc165ec8e5698ffc6dee6b510f1f92c9fd7467fe (diff)
Refs #23919 -- Replaced super(ClassName, self) with super().
Diffstat (limited to 'tests/admin_views/customadmin.py')
-rw-r--r--tests/admin_views/customadmin.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/admin_views/customadmin.py b/tests/admin_views/customadmin.py
index 5eb1f2baa2..2fbbb78595 100644
--- a/tests/admin_views/customadmin.py
+++ b/tests/admin_views/customadmin.py
@@ -21,24 +21,24 @@ class Admin2(admin.AdminSite):
# A custom index view.
def index(self, request, extra_context=None):
- return super(Admin2, self).index(request, {'foo': '*bar*'})
+ return super().index(request, {'foo': '*bar*'})
def get_urls(self):
return [
url(r'^my_view/$', self.admin_view(self.my_view), name='my_view'),
- ] + super(Admin2, self).get_urls()
+ ] + super().get_urls()
def my_view(self, request):
return HttpResponse("Django is a magical pony!")
def password_change(self, request, extra_context=None):
- return super(Admin2, self).password_change(request, {'spam': 'eggs'})
+ return super().password_change(request, {'spam': 'eggs'})
class UserLimitedAdmin(UserAdmin):
# used for testing password change on a user not in queryset
def get_queryset(self, request):
- qs = super(UserLimitedAdmin, self).get_queryset(request)
+ qs = super().get_queryset(request)
return qs.filter(is_superuser=False)