From 53979a7bf7669c803c2a493fbf136519f6a293e6 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Sat, 2 Jan 2016 11:14:49 +0100 Subject: [mod] remove buildout/makefile infrastructure --- tests/unit/engines/test_dummy.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/unit/engines/test_dummy.py (limited to 'tests/unit/engines/test_dummy.py') diff --git a/tests/unit/engines/test_dummy.py b/tests/unit/engines/test_dummy.py new file mode 100644 index 000000000..9399beaaf --- /dev/null +++ b/tests/unit/engines/test_dummy.py @@ -0,0 +1,26 @@ +from searx.engines import dummy +from searx.testing import SearxTestCase + + +class TestDummyEngine(SearxTestCase): + + def test_request(self): + test_params = [ + [1, 2, 3], + ['a'], + [], + 1 + ] + for params in test_params: + self.assertEqual(dummy.request(None, params), params) + + def test_response(self): + responses = [ + None, + [], + True, + dict(), + tuple() + ] + for response in responses: + self.assertEqual(dummy.response(response), []) -- cgit v1.2.3