logo

searx

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

test_dummy.py (596B)


  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), [])