summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_templates.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-01-24 12:22:42 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-24 18:45:54 +0100
commit2366100872ec17dde06abc63c1ad74dcf746b134 (patch)
treed6b5c393f8c2c2d01bcbb2295759f14bbf3aac05 /tests/auth_tests/test_templates.py
parent5b95d421f7ab8deadaf3c1ad3f341bdfc85bfca4 (diff)
Removed unneeded force_text calls in the test suite
Diffstat (limited to 'tests/auth_tests/test_templates.py')
-rw-r--r--tests/auth_tests/test_templates.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auth_tests/test_templates.py b/tests/auth_tests/test_templates.py
index a1d14c9774..b2c1d654a6 100644
--- a/tests/auth_tests/test_templates.py
+++ b/tests/auth_tests/test_templates.py
@@ -7,7 +7,7 @@ from django.contrib.auth.views import (
)
from django.test import RequestFactory, TestCase, override_settings
from django.urls import reverse
-from django.utils.encoding import force_bytes, force_text
+from django.utils.encoding import force_bytes
from django.utils.http import urlsafe_base64_encode
from .client import PasswordResetConfirmClient
@@ -48,7 +48,7 @@ class AuthTemplateTests(TestCase):
client = PasswordResetConfirmClient()
default_token_generator = PasswordResetTokenGenerator()
token = default_token_generator.make_token(self.user)
- uidb64 = force_text(urlsafe_base64_encode(force_bytes(self.user.pk)))
+ uidb64 = urlsafe_base64_encode(force_bytes(self.user.pk)).decode()
url = reverse('password_reset_confirm', kwargs={'uidb64': uidb64, 'token': token})
response = client.get(url)
self.assertContains(response, '<title>Enter new password</title>')