summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auth_tests/test_forms.py')
-rw-r--r--tests/auth_tests/test_forms.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auth_tests/test_forms.py b/tests/auth_tests/test_forms.py
index 983fe8c39e..167722c617 100644
--- a/tests/auth_tests/test_forms.py
+++ b/tests/auth_tests/test_forms.py
@@ -4,6 +4,8 @@ import sys
import urllib.parse
from unittest import mock
+from mail.custombackend import FailingEmailBackend
+
from django import forms
from django.contrib.auth.forms import (
AdminPasswordChangeForm,
@@ -1382,6 +1384,7 @@ class PasswordResetFormTest(TestDataMixin, TestCase):
@override_settings(EMAIL_BACKEND="mail.custombackend.FailingEmailBackend")
def test_save_send_email_exceptions_are_catched_and_logged(self):
+ self.addCleanup(FailingEmailBackend.reset)
user, username, email = self.create_dummy_user()
form = PasswordResetForm({"email": email})
self.assertTrue(form.is_valid())