diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2015-08-28 14:51:32 +0200 |
|---|---|---|
| committer | Adam Tauber <asciimoo@gmail.com> | 2015-08-28 14:51:32 +0200 |
| commit | 604f32f67276a34a3ead265ff89d3bb807902b26 (patch) | |
| tree | 30b1f04e2a797f7842c2f86433b7d2a0a0f75e78 /searx/tests/engines/test_bing_news.py | |
| parent | b9c8039d743376ab134adb3da146519c5353c36c (diff) | |
[fix] bing unicode encode error - fixes #408
Diffstat (limited to 'searx/tests/engines/test_bing_news.py')
| -rw-r--r-- | searx/tests/engines/test_bing_news.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/searx/tests/engines/test_bing_news.py b/searx/tests/engines/test_bing_news.py index a64d59b7b..c6c402650 100644 --- a/searx/tests/engines/test_bing_news.py +++ b/searx/tests/engines/test_bing_news.py @@ -28,10 +28,10 @@ class TestBingNewsEngine(SearxTestCase): self.assertRaises(AttributeError, bing_news.response, '') self.assertRaises(AttributeError, bing_news.response, '[]') - response = mock.Mock(content='<html></html>') + response = mock.Mock(text='<html></html>') self.assertEqual(bing_news.response(response), []) - response = mock.Mock(content='<html></html>') + response = mock.Mock(text='<html></html>') self.assertEqual(bing_news.response(response), []) html = """<?xml version="1.0" encoding="utf-8" ?> @@ -66,7 +66,7 @@ class TestBingNewsEngine(SearxTestCase): </item> </channel> </rss>""" # noqa - response = mock.Mock(content=html) + response = mock.Mock(text=html) results = bing_news.response(response) self.assertEqual(type(results), list) self.assertEqual(len(results), 2) @@ -105,7 +105,7 @@ class TestBingNewsEngine(SearxTestCase): </item> </channel> </rss>""" # noqa - response = mock.Mock(content=html) + response = mock.Mock(text=html) results = bing_news.response(response) self.assertEqual(type(results), list) self.assertEqual(len(results), 1) @@ -128,11 +128,11 @@ class TestBingNewsEngine(SearxTestCase): </channel> </rss>""" # noqa - response = mock.Mock(content=html) + response = mock.Mock(text=html) results = bing_news.response(response) self.assertEqual(type(results), list) self.assertEqual(len(results), 0) html = """<?xml version="1.0" encoding="utf-8" ?>gabarge""" - response = mock.Mock(content=html) + response = mock.Mock(text=html) self.assertRaises(lxml.etree.XMLSyntaxError, bing_news.response, response) |