1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-25 23:58:18 +01:00

tests/test_api.py: Use response.text for all json.loads()

This allows the code to work in Python 3.5 as well as 3.6+.
This commit is contained in:
Alan Orth 2018-11-11 17:05:31 +02:00
parent 556c5ae088
commit ffc62e9ee6
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -43,7 +43,7 @@ def test_get_items(client):
'''Test requesting 100 items.''' '''Test requesting 100 items.'''
response = client.simulate_get('/items', query_string='limit=100') response = client.simulate_get('/items', query_string='limit=100')
response_doc = json.loads(response.content) response_doc = json.loads(response.text)
assert isinstance(response_doc['currentPage'], int) assert isinstance(response_doc['currentPage'], int)
assert isinstance(response_doc['totalPages'], int) assert isinstance(response_doc['totalPages'], int)