1234567891011121314151617181920212223242526
  1. from searx.engines import dummy
  2. from searx.testing import SearxTestCase
  3. class TestDummyEngine(SearxTestCase):
  4. def test_request(self):
  5. test_params = [
  6. [1, 2, 3],
  7. ['a'],
  8. [],
  9. 1
  10. ]
  11. for params in test_params:
  12. self.assertEqual(dummy.request(None, params), params)
  13. def test_response(self):
  14. responses = [
  15. None,
  16. [],
  17. True,
  18. dict(),
  19. tuple()
  20. ]
  21. for response in responses:
  22. self.assertEqual(dummy.response(response), [])