summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarc Abonce Seguin <marc-abonce@mailbox.org>2019-01-08 20:22:16 -0600
committerMarc Abonce Seguin <marc-abonce@mailbox.org>2019-01-08 21:02:23 -0600
commit626a8e9ac923886ea368a621a7711f09fa59da56 (patch)
tree9499cc136fb2aac5ad3d9e9e6b95eff5597dae76 /tests
parent2438b3c77a3ad276aaeb15e5a54315d351a42273 (diff)
downloadsearxng-626a8e9ac923886ea368a621a7711f09fa59da56.tar.gz
searxng-626a8e9ac923886ea368a621a7711f09fa59da56.zip
[fix] unicode error with WolframAlpha API engine
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/engines/test_wolframalpha_api.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/engines/test_wolframalpha_api.py b/tests/unit/engines/test_wolframalpha_api.py
index 30d337645..0433b34aa 100644
--- a/tests/unit/engines/test_wolframalpha_api.py
+++ b/tests/unit/engines/test_wolframalpha_api.py
@@ -35,7 +35,7 @@ class TestWolframAlphaAPIEngine(SearxTestCase):
xml = '''<?xml version='1.0' encoding='UTF-8'?>
<queryresult success='false' error='false' />
'''
- response = mock.Mock(text=xml.encode('utf-8'))
+ response = mock.Mock(content=xml.encode('utf-8'))
self.assertEqual(wolframalpha_api.response(response), [])
# test basic case
@@ -83,7 +83,7 @@ class TestWolframAlphaAPIEngine(SearxTestCase):
</pod>
</queryresult>
"""
- response = mock.Mock(text=xml, request=request)
+ response = mock.Mock(content=xml, request=request)
results = wolframalpha_api.response(response)
self.assertEqual(type(results), list)
self.assertEqual(len(results), 2)
@@ -144,7 +144,7 @@ class TestWolframAlphaAPIEngine(SearxTestCase):
</pod>
</queryresult>
"""
- response = mock.Mock(text=xml, request=request)
+ response = mock.Mock(content=xml, request=request)
results = wolframalpha_api.response(response)
self.assertEqual(type(results), list)
self.assertEqual(len(results), 2)