summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_views.py
diff options
context:
space:
mode:
authorsujayskumar <sujay.skumar141295@gmail.com>2015-06-18 18:19:35 +0530
committerTim Graham <timograham@gmail.com>2015-09-18 18:56:04 -0400
commitd8d853378b3ff75c03d8bd91ea026d2b8c642b0f (patch)
tree2940f0b5eff6cef6848da60ad7c22acf63f43447 /tests/auth_tests/test_views.py
parentaac2a2d2ae2486342058db0c72ed7ba2c7c8eb1e (diff)
Fixed #24944 -- Added extra_email_context parameter to password_reset() view.
Diffstat (limited to 'tests/auth_tests/test_views.py')
-rw-r--r--tests/auth_tests/test_views.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py
index 7b497ac458..723b20a812 100644
--- a/tests/auth_tests/test_views.py
+++ b/tests/auth_tests/test_views.py
@@ -174,6 +174,18 @@ class PasswordResetTest(AuthViewsTestCase):
# default functionality is 100% the same
self.assertFalse(mail.outbox[0].message().is_multipart())
+ def test_extra_email_context(self):
+ """
+ extra_email_context should be available in the email template context.
+ """
+ response = self.client.post(
+ '/password_reset_extra_email_context/',
+ {'email': 'staffmember@example.com'},
+ )
+ self.assertEqual(response.status_code, 302)
+ self.assertEqual(len(mail.outbox), 1)
+ self.assertIn('Email email context: "Hello!"', mail.outbox[0].body)
+
def test_html_mail_template(self):
"""
A multipart email with text/plain and text/html is sent