12345678910111213141516
  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 = u'árvíztűrő tükörfúrógép'
  9. for answerer in answerers:
  10. query.query = u'{} {}'.format(answerer.keywords[0], unicode_payload)
  11. self.assertTrue(isinstance(answerer.answer(query), list))