fix: Replaced '&#39' with '&#x27' to prevent test_reset_password_email from failing on Django 3

This commit is contained in:
Jawayria
2021-09-01 19:27:33 +05:00
parent 0192d5a59a
commit b3cb59b07f

View File

@@ -9,6 +9,7 @@ import unittest
from datetime import datetime, timedelta
from unittest.mock import Mock, patch
import ddt
import django
from django.conf import settings
from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX, make_password
from django.contrib.auth.models import AnonymousUser, User # lint-amnesty, pylint: disable=imported-auth-user
@@ -283,6 +284,9 @@ class ResetPasswordTests(EventTestMixin, CacheIsolationTestCase):
body = bodies[body_type]
if django.VERSION >= (3, 0):
expected_output = "You're receiving this e-mail because you requested a password reset"
assert 'Password reset' in sent_message.subject
assert expected_output in body
assert sent_message.from_email == from_email