From c22b92a66ca3bb740b8561f660883149953026e0 Mon Sep 17 00:00:00 2001 From: Nitesh Lohchab Date: Sun, 3 Apr 2016 00:07:45 +0530 Subject: [PATCH] type('') to str --- rest_framework/authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index 0ca90873e..0cd2dd0db 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -19,7 +19,7 @@ def get_authorization_header(request): Hide some test client ickyness where the header can be unicode. """ auth = request.META.get('HTTP_AUTHORIZATION', b'') - if isinstance(auth, type('')): + if isinstance(auth, str): # Work around django test client oddness auth = auth.encode(HTTP_HEADER_ENCODING) return auth