python3: json.loads takes str as input
This commit is contained in:
parent
b1349a9496
commit
e5a282371b
|
@ -29,6 +29,7 @@ from django.contrib.auth import get_user_model
|
|||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core import mail
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.timezone import now
|
||||
from django.utils.http import urlencode
|
||||
|
||||
|
@ -83,7 +84,7 @@ def test_api_user(client):
|
|||
# login
|
||||
client.login(request=None, username='john.doe', password='password')
|
||||
response = client.get('/api/user/', HTTP_ORIGIN='http://testserver')
|
||||
data = json.loads(response.content)
|
||||
data = json.loads(force_text(response.content))
|
||||
assert isinstance(data, dict)
|
||||
assert set(data.keys()) == set(['uuid', 'username', 'first_name',
|
||||
'ou__slug', 'ou__uuid', 'ou__name',
|
||||
|
|
Loading…
Reference in New Issue