diff options
| author | Tim Graham <timograham@gmail.com> | 2015-02-14 22:03:25 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-14 22:36:49 -0500 |
| commit | 259259a819a12a9ecfd0448c646899fad78e23e0 (patch) | |
| tree | 463c5f58c2c660fe224594c62c0c9845c15ccc5e | |
| parent | e13dca859cec90b7a04d51117fec5c18c6f90a9f (diff) | |
[1.8.x] Isolated auth_tests from contenttypes_tests; refs #11505.
Backport of e0b3926026984dccc86a09c0c4f32e8bec6f3fe1 from master
| -rw-r--r-- | tests/auth_tests/test_forms.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auth_tests/test_forms.py b/tests/auth_tests/test_forms.py index 465531b679..4453154363 100644 --- a/tests/auth_tests/test_forms.py +++ b/tests/auth_tests/test_forms.py @@ -9,6 +9,7 @@ from django.contrib.auth.forms import ( UserChangeForm, UserCreationForm, ) from django.contrib.auth.models import User +from django.contrib.sites.models import Site from django.core import mail from django.core.mail import EmailMultiAlternatives from django.forms.fields import CharField, Field @@ -362,6 +363,13 @@ class PasswordResetFormTest(TestCase): 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): """ Create a user and return a tuple (user_object, username, email). |
