From d4957045513d6fb32dcffbc7ea87483479a8cb6e Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Thu, 29 Jan 2015 01:13:33 +0100 Subject: Deviant Art's unit test --- searx/tests/engines/test_digg.py | 46 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) (limited to 'searx/tests/engines/test_digg.py') diff --git a/searx/tests/engines/test_digg.py b/searx/tests/engines/test_digg.py index 7e9006c0d..6e7c9cc99 100644 --- a/searx/tests/engines/test_digg.py +++ b/searx/tests/engines/test_digg.py @@ -32,9 +32,53 @@ class TestDiggEngine(SearxTestCase): "status": "ok", "num": 10, "next_position": 20, - "html": "
" + "html": "
+ \\"\\"
" } """ + json = json.replace('\r\n', '').replace('\n', '').replace('\r', '') response = mock.Mock(text=json) results = digg.response(response) self.assertEqual(type(results), list) -- cgit v1.2.3