From d05c676ed5b1dc5372b1cb380740161b3613f7cc Mon Sep 17 00:00:00 2001 From: a01200356 Date: Sat, 2 Jan 2016 22:29:20 -0600 Subject: Add test case in wolframalpha_noapi [fix] Display multiple answers in wolframalpha_api --- searx/tests/engines/test_wolframalpha_noapi.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'searx/tests') diff --git a/searx/tests/engines/test_wolframalpha_noapi.py b/searx/tests/engines/test_wolframalpha_noapi.py index 5815e52fe..b2ae5469e 100644 --- a/searx/tests/engines/test_wolframalpha_noapi.py +++ b/searx/tests/engines/test_wolframalpha_noapi.py @@ -22,8 +22,27 @@ class TestWolframAlphaNoAPIEngine(SearxTestCase): self.assertRaises(AttributeError, wolframalpha_noapi.response, '') self.assertRaises(AttributeError, wolframalpha_noapi.response, '[]') - # response = mock.Mock(text='') - # self.assertEqual(wolframalpha_noapi.response(response), []) + html = """ + + Parangaricutirimícuaro - Wolfram|Alpha + + +
+

Wolfram|Alpha doesn't know how to interpret your input.

+
+
+ Tip:  + Check your spelling, and use English + +
+
+
+ + + """ + + response = mock.Mock(text=html) + self.assertEqual(wolframalpha_noapi.response(response), []) html = """ -- cgit v1.2.3