test_answerers.py 466 B

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