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