summaryrefslogtreecommitdiff
path: root/tests/unit/engines/test_base.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2017-11-01 21:27:57 +0100
committerGitHub <noreply@github.com>2017-11-01 21:27:57 +0100
commit3d50b0288dc2ba42baf550353f3fb5bee6462754 (patch)
tree3931e34b8501cd58db58cb651b0193ee46c23eb8 /tests/unit/engines/test_base.py
parent6d28e9d6945b5510b3d861e20521554435a10f63 (diff)
parent5954a8e16a64a369072a7487f62b6396a451ae5f (diff)
Merge pull request #1075 from kvch/finish-jibe-b-engines
Finish PRs of @jibe-b: pubmed, oa_doi_rewrite, openaire, arxiv
Diffstat (limited to 'tests/unit/engines/test_base.py')
-rw-r--r--tests/unit/engines/test_base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/engines/test_base.py b/tests/unit/engines/test_base.py
index e008b034c..b5da5bde7 100644
--- a/tests/unit/engines/test_base.py
+++ b/tests/unit/engines/test_base.py
@@ -21,10 +21,10 @@ class TestBaseEngine(SearxTestCase):
self.assertRaises(AttributeError, base.response, '')
self.assertRaises(AttributeError, base.response, '[]')
- response = mock.Mock(text='<response></response>')
+ response = mock.Mock(content=b'<response></response>')
self.assertEqual(base.response(response), [])
- xml_mock = """<?xml version="1.0"?>
+ xml_mock = b"""<?xml version="1.0"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
@@ -83,7 +83,7 @@ class TestBaseEngine(SearxTestCase):
</result>
</response>"""
- response = mock.Mock(text=xml_mock.encode('utf-8'))
+ response = mock.Mock(content=xml_mock)
results = base.response(response)
self.assertEqual(type(results), list)
self.assertEqual(len(results), 1)