summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNoémi Ványi <sitbackandwait@gmail.com>2017-11-01 12:28:18 +0100
committerNoémi Ványi <sitbackandwait@gmail.com>2017-11-01 14:22:22 +0100
commit9c2b7a82f0c515fd1df88ed80349eda7f49e0825 (patch)
treee768c70adaec321bd2481f657afb8f6ffbbadea0 /tests
parente391b2d970a19cdc39dd550929e91ace4aee8832 (diff)
downloadsearxng-9c2b7a82f0c515fd1df88ed80349eda7f49e0825.tar.gz
searxng-9c2b7a82f0c515fd1df88ed80349eda7f49e0825.zip
minor fixes of arxiv
Closes #1050
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/engines/test_arxiv.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/engines/test_arxiv.py b/tests/unit/engines/test_arxiv.py
index e51d0f483..b32c0e605 100644
--- a/tests/unit/engines/test_arxiv.py
+++ b/tests/unit/engines/test_arxiv.py
@@ -21,11 +21,11 @@ class TestBaseEngine(SearxTestCase):
self.assertRaises(AttributeError, arxiv.response, '')
self.assertRaises(AttributeError, arxiv.response, '[]')
- response = mock.Mock(text='''<?xml version="1.0" encoding="UTF-8"?>
+ response = mock.Mock(content=b'''<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"></feed>''')
self.assertEqual(arxiv.response(response), [])
- xml_mock = '''<?xml version="1.0" encoding="UTF-8"?>
+ xml_mock = b'''<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="html">ArXiv Query: search_query=all:test_query&amp;id_list=&amp;start=0&amp;max_results=1</title>
<id>http://arxiv.org/api/1</id>
@@ -50,7 +50,7 @@ class TestBaseEngine(SearxTestCase):
</feed>
'''
- response = mock.Mock(text=xml_mock.encode('utf-8'))
+ response = mock.Mock(content=xml_mock)
results = arxiv.response(response)
self.assertEqual(type(results), list)
self.assertEqual(len(results), 1)