blob: bd8789a7e4ae3e5b5f61f5c878b66e8a07de65c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# -*- coding: utf-8 -*-
from mock import Mock
from searx.answerers import answerers
from searx.testing import SearxTestCase
class AnswererTest(SearxTestCase):
def test_unicode_input(self):
query = Mock()
unicode_payload = u'árvíztűrő tükörfúrógép'
for answerer in answerers:
query.query = u'{} {}'.format(answerer.keywords[0], unicode_payload)
self.assertTrue(isinstance(answerer.answer(query), list))
|