mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
Added conditional skips for all tests dependent on the default User model
This commit is contained in:
@@ -6,14 +6,14 @@ from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm,
|
||||
PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm)
|
||||
from django.core import mail
|
||||
from django.forms.fields import Field, EmailField
|
||||
from django.test import TestCase
|
||||
from django.test import TestCase, skipIfCustomUser
|
||||
from django.test.utils import override_settings
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils import six
|
||||
from django.utils import translation
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
|
||||
@skipIfCustomUser
|
||||
@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
|
||||
class UserCreationFormTest(TestCase):
|
||||
|
||||
@@ -81,6 +81,7 @@ class UserCreationFormTest(TestCase):
|
||||
self.assertEqual(repr(u), '<User: jsmith@example.com>')
|
||||
|
||||
|
||||
@skipIfCustomUser
|
||||
@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
|
||||
class AuthenticationFormTest(TestCase):
|
||||
|
||||
@@ -133,6 +134,7 @@ class AuthenticationFormTest(TestCase):
|
||||
self.assertEqual(form.non_field_errors(), [])
|
||||
|
||||
|
||||
@skipIfCustomUser
|
||||
@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
|
||||
class SetPasswordFormTest(TestCase):
|
||||
|
||||
@@ -160,6 +162,7 @@ class SetPasswordFormTest(TestCase):
|
||||
self.assertTrue(form.is_valid())
|
||||
|
||||
|
||||
@skipIfCustomUser
|
||||
@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
|
||||
class PasswordChangeFormTest(TestCase):
|
||||
|
||||
@@ -208,6 +211,7 @@ class PasswordChangeFormTest(TestCase):
|
||||
['old_password', 'new_password1', 'new_password2'])
|
||||
|
||||
|
||||
@skipIfCustomUser
|
||||
@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
|
||||
class UserChangeFormTest(TestCase):
|
||||
|
||||
@@ -255,6 +259,7 @@ class UserChangeFormTest(TestCase):
|
||||
form.as_table()
|
||||
|
||||
|
||||
@skipIfCustomUser
|
||||
@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
|
||||
class PasswordResetFormTest(TestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user