mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 00:09:18 +02:00
Drop Python 2 (1/n): remove unicode string and url_utils
This commit is contained in:
parent
272158944b
commit
1022228d95
112 changed files with 388 additions and 535 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue