summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_templates.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-10-01 18:18:04 -0500
committerTim Graham <timograham@gmail.com>2018-10-10 14:38:22 -0400
commitc82893cb8c6b2a4a876965426c5a5bc4590e1583 (patch)
tree933e6e97f1dc87bdb2996556e83eeead7537c547 /tests/auth_tests/test_templates.py
parentf3d3338e06d571a529bb2046428eeac8e56bcbf6 (diff)
Refs #27795 -- Removed force_bytes() usage from django/utils/http.py.
django.utils.http.urlsafe_base64_encode() now returns a string, not a bytestring. Since URLs are represented as strings, urlsafe_base64_encode() should return a string. All uses immediately decoded the bytestring to a string anyway. As the inverse operation, urlsafe_base64_decode() accepts a string.
Diffstat (limited to 'tests/auth_tests/test_templates.py')
-rw-r--r--tests/auth_tests/test_templates.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auth_tests/test_templates.py b/tests/auth_tests/test_templates.py
index 958ed47cd3..db35dc930d 100644
--- a/tests/auth_tests/test_templates.py
+++ b/tests/auth_tests/test_templates.py
@@ -47,7 +47,7 @@ class AuthTemplateTests(TestCase):
client = PasswordResetConfirmClient()
default_token_generator = PasswordResetTokenGenerator()
token = default_token_generator.make_token(self.user)
- uidb64 = urlsafe_base64_encode(str(self.user.pk).encode()).decode()
+ uidb64 = urlsafe_base64_encode(str(self.user.pk).encode())
url = reverse('password_reset_confirm', kwargs={'uidb64': uidb64, 'token': token})
response = client.get(url)
self.assertContains(response, '<title>Enter new password</title>')