From 5da78f7b37b60a6e100e245de99a0ba45be49f01 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Fri, 16 Oct 2015 12:01:35 +0200 Subject: [PATCH] [fix] bing news test mock --- searx/tests/engines/test_bing_news.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/searx/tests/engines/test_bing_news.py b/searx/tests/engines/test_bing_news.py index c6c402650..a64d59b7b 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(text='') + response = mock.Mock(content='') self.assertEqual(bing_news.response(response), []) - response = mock.Mock(text='') + response = mock.Mock(content='') self.assertEqual(bing_news.response(response), []) html = """ @@ -66,7 +66,7 @@ class TestBingNewsEngine(SearxTestCase): """ # noqa - response = mock.Mock(text=html) + response = mock.Mock(content=html) results = bing_news.response(response) self.assertEqual(type(results), list) self.assertEqual(len(results), 2) @@ -105,7 +105,7 @@ class TestBingNewsEngine(SearxTestCase): """ # noqa - response = mock.Mock(text=html) + response = mock.Mock(content=html) results = bing_news.response(response) self.assertEqual(type(results), list) self.assertEqual(len(results), 1) @@ -128,11 +128,11 @@ class TestBingNewsEngine(SearxTestCase): """ # noqa - response = mock.Mock(text=html) + response = mock.Mock(content=html) results = bing_news.response(response) self.assertEqual(type(results), list) self.assertEqual(len(results), 0) html = """gabarge""" - response = mock.Mock(text=html) + response = mock.Mock(content=html) self.assertRaises(lxml.etree.XMLSyntaxError, bing_news.response, response)