From ffc62e9ee6e27155a38184d0787ced38943b2904 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 11 Nov 2018 17:05:31 +0200 Subject: [PATCH] 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+. --- tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index 7c6f1b1..3015497 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -43,7 +43,7 @@ def test_get_items(client): '''Test requesting 100 items.''' 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['totalPages'], int)