summaryrefslogtreecommitdiff
path: root/tests/auth_tests
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/auth_tests
parentdc165ec8e5698ffc6dee6b510f1f92c9fd7467fe (diff)
Refs #23919 -- Replaced super(ClassName, self) with super().
Diffstat (limited to 'tests/auth_tests')
-rw-r--r--tests/auth_tests/client.py4
-rw-r--r--tests/auth_tests/test_auth_backends.py2
-rw-r--r--tests/auth_tests/test_deprecated_views.py2
-rw-r--r--tests/auth_tests/test_forms.py4
-rw-r--r--tests/auth_tests/test_remote_user.py4
-rw-r--r--tests/auth_tests/test_views.py2
-rw-r--r--tests/auth_tests/urls.py2
-rw-r--r--tests/auth_tests/urls_custom_user_admin.py2
8 files changed, 11 insertions, 11 deletions
diff --git a/tests/auth_tests/client.py b/tests/auth_tests/client.py
index 004101108b..8f09f115cd 100644
--- a/tests/auth_tests/client.py
+++ b/tests/auth_tests/client.py
@@ -34,8 +34,8 @@ class PasswordResetConfirmClient(Client):
def get(self, path, *args, **kwargs):
redirect_url = self._get_password_reset_confirm_redirect_url(path)
- return super(PasswordResetConfirmClient, self).get(redirect_url, *args, **kwargs)
+ return super().get(redirect_url, *args, **kwargs)
def post(self, path, *args, **kwargs):
redirect_url = self._get_password_reset_confirm_redirect_url(path)
- return super(PasswordResetConfirmClient, self).post(redirect_url, *args, **kwargs)
+ return super().post(redirect_url, *args, **kwargs)
diff --git a/tests/auth_tests/test_auth_backends.py b/tests/auth_tests/test_auth_backends.py
index 3d929698c9..0c516dda34 100644
--- a/tests/auth_tests/test_auth_backends.py
+++ b/tests/auth_tests/test_auth_backends.py
@@ -27,7 +27,7 @@ class CountingMD5PasswordHasher(MD5PasswordHasher):
def encode(self, *args, **kwargs):
type(self).calls += 1
- return super(CountingMD5PasswordHasher, self).encode(*args, **kwargs)
+ return super().encode(*args, **kwargs)
class BaseModelBackendTest:
diff --git a/tests/auth_tests/test_deprecated_views.py b/tests/auth_tests/test_deprecated_views.py
index 285638027e..ba43140ebe 100644
--- a/tests/auth_tests/test_deprecated_views.py
+++ b/tests/auth_tests/test_deprecated_views.py
@@ -332,7 +332,7 @@ class UUIDUserPasswordResetTest(CustomUserPasswordResetTest):
username='foo',
password='foo',
)
- return super(UUIDUserPasswordResetTest, self)._test_confirm_start()
+ return super()._test_confirm_start()
@ignore_warnings(category=RemovedInDjango21Warning)
diff --git a/tests/auth_tests/test_forms.py b/tests/auth_tests/test_forms.py
index abd5b0f8df..24343ea5f5 100644
--- a/tests/auth_tests/test_forms.py
+++ b/tests/auth_tests/test_forms.py
@@ -564,7 +564,7 @@ class UserChangeFormTest(TestDataMixin, TestCase):
class MyUserForm(UserChangeForm):
def __init__(self, *args, **kwargs):
- super(MyUserForm, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self.fields['groups'].help_text = 'These groups give users different permissions'
class Meta(UserChangeForm.Meta):
@@ -645,7 +645,7 @@ class PasswordResetFormTest(TestDataMixin, TestCase):
@classmethod
def setUpClass(cls):
- super(PasswordResetFormTest, cls).setUpClass()
+ super().setUpClass()
# This cleanup is necessary because contrib.sites cache
# makes tests interfere with each other, see #11505
Site.objects.clear_cache()
diff --git a/tests/auth_tests/test_remote_user.py b/tests/auth_tests/test_remote_user.py
index e03e0a3b95..2a1ebbb569 100644
--- a/tests/auth_tests/test_remote_user.py
+++ b/tests/auth_tests/test_remote_user.py
@@ -218,7 +218,7 @@ class RemoteUserCustomTest(RemoteUserTest):
The strings passed in REMOTE_USER should be cleaned and the known users
should not have been configured with an email address.
"""
- super(RemoteUserCustomTest, self).test_known_user()
+ super().test_known_user()
self.assertEqual(User.objects.get(username='knownuser').email, '')
self.assertEqual(User.objects.get(username='knownuser2').email, '')
@@ -226,7 +226,7 @@ class RemoteUserCustomTest(RemoteUserTest):
"""
The unknown user created should be configured with an email address.
"""
- super(RemoteUserCustomTest, self).test_unknown_user()
+ super().test_unknown_user()
newuser = User.objects.get(username='newuser')
self.assertEqual(newuser.email, 'user@example.com')
diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py
index 1e18e0c73b..76d167fa40 100644
--- a/tests/auth_tests/test_views.py
+++ b/tests/auth_tests/test_views.py
@@ -411,7 +411,7 @@ class UUIDUserPasswordResetTest(CustomUserPasswordResetTest):
username='foo',
password='foo',
)
- return super(UUIDUserPasswordResetTest, self)._test_confirm_start()
+ return super()._test_confirm_start()
class ChangePasswordTest(AuthViewsTestCase):
diff --git a/tests/auth_tests/urls.py b/tests/auth_tests/urls.py
index 35bdbbb3a8..392355f9b3 100644
--- a/tests/auth_tests/urls.py
+++ b/tests/auth_tests/urls.py
@@ -15,7 +15,7 @@ from django.views.decorators.cache import never_cache
class CustomRequestAuthenticationForm(AuthenticationForm):
def __init__(self, request, *args, **kwargs):
assert isinstance(request, HttpRequest)
- super(CustomRequestAuthenticationForm, self).__init__(request, *args, **kwargs)
+ super().__init__(request, *args, **kwargs)
@never_cache
diff --git a/tests/auth_tests/urls_custom_user_admin.py b/tests/auth_tests/urls_custom_user_admin.py
index 94039dfa57..59b80d04d7 100644
--- a/tests/auth_tests/urls_custom_user_admin.py
+++ b/tests/auth_tests/urls_custom_user_admin.py
@@ -12,7 +12,7 @@ class CustomUserAdmin(UserAdmin):
# integer manually to avoid causing an error.
original_pk = request.user.pk
request.user.pk = 1
- super(CustomUserAdmin, self).log_change(request, object, message)
+ super().log_change(request, object, message)
request.user.pk = original_pk