mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02:00
[fix] bing unicode encode error - fixes #408
This commit is contained in:
parent
b9c8039d74
commit
604f32f672
6 changed files with 18 additions and 18 deletions
|
@ -29,10 +29,10 @@ class TestBingEngine(SearxTestCase):
|
|||
self.assertRaises(AttributeError, bing.response, '')
|
||||
self.assertRaises(AttributeError, bing.response, '[]')
|
||||
|
||||
response = mock.Mock(content='<html></html>')
|
||||
response = mock.Mock(text='<html></html>')
|
||||
self.assertEqual(bing.response(response), [])
|
||||
|
||||
response = mock.Mock(content='<html></html>')
|
||||
response = mock.Mock(text='<html></html>')
|
||||
self.assertEqual(bing.response(response), [])
|
||||
|
||||
html = """
|
||||
|
@ -54,7 +54,7 @@ class TestBingEngine(SearxTestCase):
|
|||
</div>
|
||||
</div>
|
||||
"""
|
||||
response = mock.Mock(content=html)
|
||||
response = mock.Mock(text=html)
|
||||
results = bing.response(response)
|
||||
self.assertEqual(type(results), list)
|
||||
self.assertEqual(len(results), 1)
|
||||
|
@ -81,7 +81,7 @@ class TestBingEngine(SearxTestCase):
|
|||
</div>
|
||||
</li>
|
||||
"""
|
||||
response = mock.Mock(content=html)
|
||||
response = mock.Mock(text=html)
|
||||
results = bing.response(response)
|
||||
self.assertEqual(type(results), list)
|
||||
self.assertEqual(len(results), 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue