1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #35727 -- Updated response.content.decode calls to use the HttpResponse.text property.

Signed-off-by: SaJH <wogur981208@gmail.com>
This commit is contained in:
SaJH
2024-10-16 01:11:46 +09:00
committed by Sarah Boyce
parent 4a685bc0dc
commit 0c81775515
12 changed files with 63 additions and 65 deletions

View File

@@ -1521,7 +1521,7 @@ class ChangelistTests(MessagesTestMixin, AuthViewsTestCase):
# Test the link inside password field help_text.
rel_link = re.search(
r'<a class="button" href="([^"]*)">Reset password</a>',
response.content.decode(),
response.text,
)[1]
self.assertEqual(urljoin(user_change_url, rel_link), password_change_url)
@@ -1617,7 +1617,7 @@ class ChangelistTests(MessagesTestMixin, AuthViewsTestCase):
# Test the link inside password field help_text.
rel_link = re.search(
r'<a class="button" href="([^"]*)">Set password</a>',
response.content.decode(),
response.text,
)[1]
self.assertEqual(urljoin(user_change_url, rel_link), password_change_url)