From b7257a21bf3dfa7353980f343c83a616da44daa7 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 28 Aug 2018 17:55:30 +0100 Subject: [PATCH] Fix json.loads in Python 3.5 3.5 requires a str, not a bytes https://travis-ci.org/simonw/datasette/jobs/421660555 --- tests/test_plugins.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 20548877..ce8fd78b 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -53,7 +53,9 @@ def test_plugin_extra_css_urls(app_client, path, expected_decoded_object): ][0]["href"] # This link has a base64-encoded JSON blob in it encoded = special_href.split("/")[3] - assert expected_decoded_object == json.loads(base64.b64decode(encoded)) + assert expected_decoded_object == json.loads( + base64.b64decode(encoded).decode("utf8") + ) def test_plugin_extra_js_urls(app_client):