mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user