diff --git a/deluge/tests/test_json_api.py b/deluge/tests/test_json_api.py index 546d57fc3..8c6d34bdb 100644 --- a/deluge/tests/test_json_api.py +++ b/deluge/tests/test_json_api.py @@ -86,7 +86,7 @@ class JSONTestCase(JSONBase): def write(response_str): request.write_was_called = True - response = json_lib.loads(response_str) + response = json_lib.loads(response_str.decode()) self.assertEqual(response['result'], None) self.assertEqual(response['id'], None) self.assertEqual( @@ -271,7 +271,7 @@ class JSONRequestFailedTestCase(JSONBase, WebServerMockBase): def write(response_str): request.write_was_called = True - response = json_lib.loads(response_str) + response = json_lib.loads(response_str.decode()) self.assertEqual(response['result'], None, 'BAD RESULT') self.assertEqual(response['id'], 0) self.assertEqual( diff --git a/deluge/tests/test_webserver.py b/deluge/tests/test_webserver.py index abfac366e..e0986e475 100644 --- a/deluge/tests/test_webserver.py +++ b/deluge/tests/test_webserver.py @@ -55,6 +55,6 @@ class WebServerTestCase(WebServerTestBase, WebServerMockBase): body = yield twisted.web.client.readBody(d) - json = json_lib.loads(body) + json = json_lib.loads(body.decode()) self.assertEqual(None, json['error']) self.assertEqual('torrent_filehash', json['result']['name'])