From 1022228d950c2a809ed613df1a515d9a6cafda7c Mon Sep 17 00:00:00 2001 From: Dalf Date: Thu, 6 Aug 2020 17:42:46 +0200 Subject: Drop Python 2 (1/n): remove unicode string and url_utils --- tests/unit/test_webapp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/unit/test_webapp.py') diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py index 8eed607e3..7dd465898 100644 --- a/tests/unit/test_webapp.py +++ b/tests/unit/test_webapp.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- import json +from urllib.parse import ParseResult from mock import Mock from searx import webapp from searx.testing import SearxTestCase from searx.search import Search -from searx.url_utils import ParseResult class ViewsTestCase(SearxTestCase): @@ -89,7 +89,7 @@ class ViewsTestCase(SearxTestCase): def test_index_json(self): result = self.app.post('/', data={'q': 'test', 'format': 'json'}) - result_dict = json.loads(result.data.decode('utf-8')) + result_dict = json.loads(result.data.decode()) self.assertEqual('test', result_dict['query']) self.assertEqual(len(result_dict['results']), 2) -- cgit v1.2.3