mirror of
https://github.com/searxng/searxng.git
synced 2025-07-12 15:59:21 +02:00
[enh] py3 compatibility
This commit is contained in:
parent
46a2c63f8e
commit
52e615dede
115 changed files with 517 additions and 513 deletions
|
@ -1,8 +1,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import mock
|
||||
import sys
|
||||
from searx.testing import SearxTestCase
|
||||
from searx import utils
|
||||
|
||||
if sys.version_info[0] == 3:
|
||||
unicode = str
|
||||
|
||||
|
||||
class TestUtils(SearxTestCase):
|
||||
|
||||
|
@ -30,9 +34,9 @@ class TestUtils(SearxTestCase):
|
|||
self.assertEqual(utils.highlight_content(content, None), content)
|
||||
|
||||
content = 'a'
|
||||
query = 'test'
|
||||
query = b'test'
|
||||
self.assertEqual(utils.highlight_content(content, query), content)
|
||||
query = 'a test'
|
||||
query = b'a test'
|
||||
self.assertEqual(utils.highlight_content(content, query), content)
|
||||
|
||||
def test_html_to_text(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue