summaryrefslogtreecommitdiff
path: root/tests/unit/test_answerers.py
blob: e96e20c3c4430e17103f9bb2b5fcf7dc2e98abc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring

from mock import Mock

from searx.answerers import answerers
from tests import SearxTestCase


class AnswererTest(SearxTestCase):  # pylint: disable=missing-class-docstring
    def test_unicode_input(self):
        query = Mock()
        unicode_payload = 'árvíztűrő tükörfúrógép'
        for answerer in answerers:
            query.query = '{} {}'.format(answerer.keywords[0], unicode_payload)
            self.assertTrue(isinstance(answerer.answer(query), list))