summaryrefslogtreecommitdiff
path: root/tests/unit/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test_utils.py')
-rw-r--r--tests/unit/test_utils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py
index 04480791d..eb40e62e2 100644
--- a/tests/unit/test_utils.py
+++ b/tests/unit/test_utils.py
@@ -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):