decoding issue fix
This commit is contained in:
arbisoft
2019-08-23 13:55:59 +05:00
parent 0c2f4b793d
commit 10312e977d

View File

@@ -94,7 +94,7 @@ class CcxRestApiTest(CcxTestCase, APITestCase):
}
token_resp = self.client.post(reverse('oauth2:access_token'), data=token_data, format='multipart')
self.assertEqual(token_resp.status_code, status.HTTP_200_OK)
token_resp_json = json.loads(token_resp.content)
token_resp_json = json.loads(token_resp.content.decode('utf-8'))
return u'{token_type} {token}'.format(
token_type=token_resp_json['token_type'],
token=token_resp_json['access_token']