mirror of
https://github.com/searxng/searxng.git
synced 2025-07-14 16:59:21 +02:00
Add test case in wolframalpha_noapi
[fix] Display multiple answers in wolframalpha_api
This commit is contained in:
parent
19d025f0e7
commit
d05c676ed5
3 changed files with 28 additions and 8 deletions
|
@ -22,8 +22,27 @@ class TestWolframAlphaNoAPIEngine(SearxTestCase):
|
|||
self.assertRaises(AttributeError, wolframalpha_noapi.response, '')
|
||||
self.assertRaises(AttributeError, wolframalpha_noapi.response, '[]')
|
||||
|
||||
# response = mock.Mock(text='<html></html>')
|
||||
# self.assertEqual(wolframalpha_noapi.response(response), [])
|
||||
html = """
|
||||
<!DOCTYPE html>
|
||||
<title> Parangaricutirimícuaro - Wolfram|Alpha</title>
|
||||
<meta charset="utf-8" />
|
||||
<body>
|
||||
<div id="closest">
|
||||
<p class="pfail">Wolfram|Alpha doesn't know how to interpret your input.</p>
|
||||
<div id="dtips">
|
||||
<div class="tip">
|
||||
<span class="tip-title">Tip: </span>
|
||||
Check your spelling, and use English
|
||||
<span class="tip-extra"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
||||
response = mock.Mock(text=html)
|
||||
self.assertEqual(wolframalpha_noapi.response(response), [])
|
||||
|
||||
html = """
|
||||
<!DOCTYPE html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue