From 09ee2aa69dbd4815e0e1e1de53f3571972e04903 Mon Sep 17 00:00:00 2001 From: marc Date: Wed, 6 Jul 2016 17:29:40 -0500 Subject: [fix] Result text in Wolfram|Alpha (#607) --- tests/unit/engines/test_wolframalpha_api.py | 6 ++++-- tests/unit/engines/test_wolframalpha_noapi.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'tests') 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 = """ @@ -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']) -- cgit v1.2.3-54-g00ecf