summaryrefslogtreecommitdiff
path: root/searx/tests
diff options
context:
space:
mode:
Diffstat (limited to 'searx/tests')
-rw-r--r--searx/tests/engines/test_wolframalpha_api.py6
-rw-r--r--searx/tests/engines/test_wolframalpha_noapi.py4
2 files changed, 6 insertions, 4 deletions
diff --git a/searx/tests/engines/test_wolframalpha_api.py b/searx/tests/engines/test_wolframalpha_api.py
index a4a4184c5..d9e23182f 100644
--- a/searx/tests/engines/test_wolframalpha_api.py
+++ b/searx/tests/engines/test_wolframalpha_api.py
@@ -148,7 +148,8 @@ class TestWolframAlphaAPIEngine(SearxTestCase):
response = mock.Mock(content=xml)
results = wolframalpha_api.response(response)
self.assertEqual(type(results), list)
- self.assertEqual(len(results), 2)
+ # self.assertEqual(len(results), 2)
+ self.assertEqual(len(results), 1)
self.assertIn("i", results[0]['answer'])
# self.assertIn("sqrt(-1) - Wolfram|Alpha", results[1]['title'])
# self.assertIn("http://www.wolframalpha.com/input/?i=sqrt%28-1%29", results[1]['url'])
@@ -248,7 +249,8 @@ class TestWolframAlphaAPIEngine(SearxTestCase):
response = mock.Mock(content=xml)
results = wolframalpha_api.response(response)
self.assertEqual(type(results), list)
- self.assertEqual(len(results), 2)
+ # self.assertEqual(len(results), 2)
+ self.assertEqual(len(results), 1)
self.assertIn("log(x)+c", results[0]['answer'])
# self.assertIn("integral 1/x - Wolfram|Alpha", results[1]['title'])
# self.assertIn("http://www.wolframalpha.com/input/?i=integral+1%2Fx", results[1]['url'])
diff --git a/searx/tests/engines/test_wolframalpha_noapi.py b/searx/tests/engines/test_wolframalpha_noapi.py
index b884ffa38..5815e52fe 100644
--- a/searx/tests/engines/test_wolframalpha_noapi.py
+++ b/searx/tests/engines/test_wolframalpha_noapi.py
@@ -138,7 +138,7 @@ class TestWolframAlphaNoAPIEngine(SearxTestCase):
self.assertEqual(len(results), 2)
self.assertIn("i", results[0]['answer'])
self.assertIn("sqrt(-1) - Wolfram|Alpha", results[1]['title'])
- self.assertIn("http://www.wolframalpha.com/input/?i=sqrt%28-1%29", results[1]['url'])
+ self.assertIn("http://www.wolframalpha.com/input/?i=+sqrt%28-1%29", results[1]['url'])
html = """
<!DOCTYPE html>
@@ -233,4 +233,4 @@ class TestWolframAlphaNoAPIEngine(SearxTestCase):
self.assertEqual(len(results), 2)
self.assertIn("log(x)+c", results[0]['answer'])
self.assertIn("integral 1/x - Wolfram|Alpha", results[1]['title'])
- self.assertIn("http://www.wolframalpha.com/input/?i=integral+1%2Fx", results[1]['url'])
+ self.assertIn("http://www.wolframalpha.com/input/?i=+integral+1%2Fx", results[1]['url'])