summaryrefslogtreecommitdiff
path: root/tests/unit/test_answerers.py
blob: 73148f32710f86b23dbd7213d4be80666db004fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- coding: utf-8 -*-

from mock import Mock

from searx.answerers import answerers
from tests import SearxTestCase


class AnswererTest(SearxTestCase):
    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))