Refs #27795 -- Removed force_bytes/text() usage in tests.

This commit is contained in:
Tim Graham 2018-02-07 14:20:04 -05:00 committed by GitHub
parent b38532cd6b
commit fa75b2cb51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 29 additions and 39 deletions

View file

@ -28,7 +28,6 @@ from django.middleware.csrf import CsrfViewMiddleware, get_token
from django.test import Client, TestCase, override_settings
from django.test.utils import patch_logger
from django.urls import NoReverseMatch, reverse, reverse_lazy
from django.utils.encoding import force_text
from django.utils.translation import LANGUAGE_SESSION_KEY
from .client import PasswordResetConfirmClient
@ -1150,7 +1149,7 @@ class ChangelistTests(AuthViewsTestCase):
# Test the link inside password field help_text.
rel_link = re.search(
r'you can change the password using <a href="([^"]*)">this form</a>',
force_text(response.content)
response.content.decode()
).groups()[0]
self.assertEqual(
os.path.normpath(user_change_url + rel_link),