fix test faliures of btdigg engine.

This fix the test failures related to 01d2fb9f70
This commit is contained in:
Kang-min Liu 2015-11-14 00:02:36 +01:00
parent 01d2fb9f70
commit c7c6c35ccd
1 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ class TestBtdiggEngine(SearxTestCase):
self.assertRaises(AttributeError, btdigg.response, '') self.assertRaises(AttributeError, btdigg.response, '')
self.assertRaises(AttributeError, btdigg.response, '[]') self.assertRaises(AttributeError, btdigg.response, '[]')
response = mock.Mock(text='<html></html>') response = mock.Mock(content='<html></html>')
self.assertEqual(btdigg.response(response), []) self.assertEqual(btdigg.response(response), [])
html = """ html = """
@ -82,7 +82,7 @@ class TestBtdiggEngine(SearxTestCase):
</table> </table>
</div> </div>
""" """
response = mock.Mock(text=html) response = mock.Mock(content=html)
results = btdigg.response(response) results = btdigg.response(response)
self.assertEqual(type(results), list) self.assertEqual(type(results), list)
self.assertEqual(len(results), 1) self.assertEqual(len(results), 1)
@ -101,7 +101,7 @@ class TestBtdiggEngine(SearxTestCase):
</table> </table>
</div> </div>
""" """
response = mock.Mock(text=html) response = mock.Mock(content=html)
results = btdigg.response(response) results = btdigg.response(response)
self.assertEqual(type(results), list) self.assertEqual(type(results), list)
self.assertEqual(len(results), 0) self.assertEqual(len(results), 0)
@ -367,7 +367,7 @@ class TestBtdiggEngine(SearxTestCase):
</table> </table>
</div> </div>
""" """
response = mock.Mock(text=html) response = mock.Mock(content=html)
results = btdigg.response(response) results = btdigg.response(response)
self.assertEqual(type(results), list) self.assertEqual(type(results), list)
self.assertEqual(len(results), 5) self.assertEqual(len(results), 5)