Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Apkawa committed Dec 15, 2019
1 parent 4479158 commit 0366430
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rest_framework_jwt_oauth2/tests/api_fixtures.py
Expand Up @@ -6,7 +6,7 @@
from django.contrib.auth.models import User
from django.test.client import Client, MULTIPART_CONTENT
from django.urls import reverse, NoReverseMatch
from django.utils.encoding import smart_text
from django.utils.encoding import smart_text, smart_str
from rest_framework_jwt.serializers import jwt_payload_handler, jwt_encode_handler, \
jwt_decode_handler

Expand Down Expand Up @@ -100,7 +100,7 @@ def request(self, **request):
response = super(JWTApiTestClient, self).request(**request)
if assert_code:
assert assert_code == response.status_code, smart_text(response.content)
response.json = lambda: json.loads(response.content)
response.json = lambda: json.loads(smart_str(response.content))
response.token = lambda: response.get('Access-Token')
if update_token and response.token():
self.set_jwt_token(response.token())
Expand Down

0 comments on commit 0366430

Please sign in to comment.