diff options
Diffstat (limited to 'tests/unit/test_answerers.py')
-rw-r--r-- | tests/unit/test_answerers.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/unit/test_answerers.py b/tests/unit/test_answerers.py index e96e20c3c..716b544de 100644 --- a/tests/unit/test_answerers.py +++ b/tests/unit/test_answerers.py @@ -2,15 +2,16 @@ # pylint: disable=missing-module-docstring from mock import Mock +from parameterized import parameterized from searx.answerers import answerers from tests import SearxTestCase class AnswererTest(SearxTestCase): # pylint: disable=missing-class-docstring - def test_unicode_input(self): + @parameterized.expand(answerers) + def test_unicode_input(self, answerer): 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)) + query.query = '{} {}'.format(answerer.keywords[0], unicode_payload) + self.assertIsInstance(answerer.answer(query), list) |