Isolated auth_tests from contenttypes_tests; refs #11505.
This commit is contained in:
parent
49647bec6e
commit
e0b3926026
|
@ -9,6 +9,7 @@ from django.contrib.auth.forms import (
|
||||||
UserChangeForm, UserCreationForm,
|
UserChangeForm, UserCreationForm,
|
||||||
)
|
)
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
from django.contrib.sites.models import Site
|
||||||
from django.core import mail
|
from django.core import mail
|
||||||
from django.core.mail import EmailMultiAlternatives
|
from django.core.mail import EmailMultiAlternatives
|
||||||
from django.forms.fields import CharField, Field
|
from django.forms.fields import CharField, Field
|
||||||
|
@ -362,6 +363,13 @@ class PasswordResetFormTest(TestCase):
|
||||||
|
|
||||||
fixtures = ['authtestdata.json']
|
fixtures = ['authtestdata.json']
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls):
|
||||||
|
super(PasswordResetFormTest, cls).setUpClass()
|
||||||
|
# This cleanup is necessary because contrib.sites cache
|
||||||
|
# makes tests interfere with each other, see #11505
|
||||||
|
Site.objects.clear_cache()
|
||||||
|
|
||||||
def create_dummy_user(self):
|
def create_dummy_user(self):
|
||||||
"""
|
"""
|
||||||
Create a user and return a tuple (user_object, username, email).
|
Create a user and return a tuple (user_object, username, email).
|
||||||
|
|
Loading…
Reference in New Issue