summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormarc <a01200356@itesm.mx>2016-07-06 17:29:40 -0500
committerfirebovine <firebovine@gmail.com>2016-09-10 17:42:04 -0400
commit09ee2aa69dbd4815e0e1e1de53f3571972e04903 (patch)
treefbb9feb888d6b05f2fb10fba058b73e98e0adab9 /tests
parent390ad59bfcd256e9145d7ef539acaf3a83a73c8b (diff)
downloadsearxng-09ee2aa69dbd4815e0e1e1de53f3571972e04903.tar.gz
searxng-09ee2aa69dbd4815e0e1e1de53f3571972e04903.zip
[fix] Result text in Wolfram|Alpha (#607)
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/engines/test_wolframalpha_api.py6
-rw-r--r--tests/unit/engines/test_wolframalpha_noapi.py6
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/unit/engines/test_wolframalpha_api.py b/tests/unit/engines/test_wolframalpha_api.py
index 76404e192..f5b3538a3 100644
--- a/tests/unit/engines/test_wolframalpha_api.py
+++ b/tests/unit/engines/test_wolframalpha_api.py
@@ -103,7 +103,8 @@ class TestWolframAlphaAPIEngine(SearxTestCase):
self.assertEqual(referer_url, results[0]['urls'][0]['url'])
self.assertEqual('Wolfram|Alpha', results[0]['urls'][0]['title'])
self.assertEqual(referer_url, results[1]['url'])
- self.assertEqual('Wolfram|Alpha', results[1]['title'])
+ self.assertEqual('input_plaintext - Wolfram|Alpha', results[1]['title'])
+ self.assertIn('result_plaintext', results[1]['content'])
# test calc
xml = """<?xml version='1.0' encoding='UTF-8'?>
@@ -161,4 +162,5 @@ class TestWolframAlphaAPIEngine(SearxTestCase):
self.assertEqual(referer_url, results[0]['urls'][0]['url'])
self.assertEqual('Wolfram|Alpha', results[0]['urls'][0]['title'])
self.assertEqual(referer_url, results[1]['url'])
- self.assertEqual('Wolfram|Alpha', results[1]['title'])
+ self.assertEqual('integral_plaintext - Wolfram|Alpha', results[1]['title'])
+ self.assertIn('integral_plaintext', results[1]['content'])
diff --git a/tests/unit/engines/test_wolframalpha_noapi.py b/tests/unit/engines/test_wolframalpha_noapi.py
index a8f73470e..b3688a5e8 100644
--- a/tests/unit/engines/test_wolframalpha_noapi.py
+++ b/tests/unit/engines/test_wolframalpha_noapi.py
@@ -140,7 +140,8 @@ class TestWolframAlphaNoAPIEngine(SearxTestCase):
self.assertEqual(referer_url, results[0]['urls'][0]['url'])
self.assertEqual('Wolfram|Alpha', results[0]['urls'][0]['title'])
self.assertEqual(referer_url, results[1]['url'])
- self.assertEqual('Wolfram|Alpha', results[1]['title'])
+ self.assertEqual('input_plaintext - Wolfram|Alpha', results[1]['title'])
+ self.assertIn('result_plaintext', results[1]['content'])
# test calc
json = r"""
@@ -219,4 +220,5 @@ class TestWolframAlphaNoAPIEngine(SearxTestCase):
self.assertEqual(referer_url, results[0]['urls'][0]['url'])
self.assertEqual('Wolfram|Alpha', results[0]['urls'][0]['title'])
self.assertEqual(referer_url, results[1]['url'])
- self.assertEqual('Wolfram|Alpha', results[1]['title'])
+ self.assertEqual('integral_plaintext - Wolfram|Alpha', results[1]['title'])
+ self.assertIn('integral_plaintext', results[1]['content'])