summaryrefslogtreecommitdiff
path: root/tests/csrf_tests/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/csrf_tests/tests.py')
-rw-r--r--tests/csrf_tests/tests.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/csrf_tests/tests.py b/tests/csrf_tests/tests.py
index 33f30a8353..49247b7af8 100644
--- a/tests/csrf_tests/tests.py
+++ b/tests/csrf_tests/tests.py
@@ -13,7 +13,6 @@ from django.middleware.csrf import (
from django.test import SimpleTestCase, override_settings
from django.test.utils import patch_logger
from django.utils.encoding import force_bytes
-from django.utils.six import text_type
from django.views.decorators.csrf import csrf_exempt, requires_csrf_token
from .views import (
@@ -65,7 +64,7 @@ class CsrfViewMiddlewareTestMixin(object):
return req
def _check_token_present(self, response, csrf_id=None):
- text = text_type(response.content, response.charset)
+ text = str(response.content, response.charset)
match = re.search("name='csrfmiddlewaretoken' value='(.*?)'", text)
csrf_token = csrf_id or self._csrf_id
self.assertTrue(