logo

searx

My custom branche(s) on searx, a meta-search engine git clone https://anongit.hacktivis.me/git/searx.git/

test_answerers.py (468B)


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