1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-16 17:40:11 +01:00
searxng/tests/unit/test_answerers.py

16 lines
457 B
Python
Raw Normal View History

# -*- 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))