2016-11-19 19:53:51 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
from mock import Mock
|
|
|
|
|
|
|
|
from searx.answerers import answerers
|
2021-09-02 14:01:34 +00:00
|
|
|
from tests import SearxTestCase
|
2016-11-19 19:53:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
class AnswererTest(SearxTestCase):
|
|
|
|
def test_unicode_input(self):
|
|
|
|
query = Mock()
|
2020-08-06 15:42:46 +00:00
|
|
|
unicode_payload = 'árvíztűrő tükörfúrógép'
|
2016-11-19 19:53:51 +00:00
|
|
|
for answerer in answerers:
|
2020-08-06 15:42:46 +00:00
|
|
|
query.query = '{} {}'.format(answerer.keywords[0], unicode_payload)
|
2016-11-19 19:53:51 +00:00
|
|
|
self.assertTrue(isinstance(answerer.answer(query), list))
|