summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_views.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_views.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_views.py')
-rw-r--r--tests/auth_tests/test_views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py
index d12830ddc8..3d0c3ecadf 100644
--- a/tests/auth_tests/test_views.py
+++ b/tests/auth_tests/test_views.py
@@ -424,7 +424,7 @@ class UUIDUserPasswordResetTest(CustomUserPasswordResetTest):
def test_confirm_invalid_uuid(self):
"""A uidb64 that decodes to a non-UUID doesn't crash."""
_, path = self._test_confirm_start()
- invalid_uidb64 = urlsafe_base64_encode('INVALID_UUID'.encode()).decode()
+ invalid_uidb64 = urlsafe_base64_encode('INVALID_UUID'.encode())
first, _uuidb64_, second = path.strip('/').split('/')
response = self.client.get('/' + '/'.join((first, invalid_uidb64, second)) + '/')
self.assertContains(response, 'The password reset link was invalid')