Browse Source

fix test faliures of btdigg engine.

This fix the test failures related to 01d2fb9f703fee2a28cdb4c6583158054f9d7558
Kang-min Liu 9 years ago
parent
commit
c7c6c35ccd
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      searx/tests/engines/test_btdigg.py

+ 4
- 4
searx/tests/engines/test_btdigg.py View File

@@ -22,7 +22,7 @@ class TestBtdiggEngine(SearxTestCase):
22 22
         self.assertRaises(AttributeError, btdigg.response, '')
23 23
         self.assertRaises(AttributeError, btdigg.response, '[]')
24 24
 
25
-        response = mock.Mock(text='<html></html>')
25
+        response = mock.Mock(content='<html></html>')
26 26
         self.assertEqual(btdigg.response(response), [])
27 27
 
28 28
         html = """
@@ -82,7 +82,7 @@ class TestBtdiggEngine(SearxTestCase):
82 82
             </table>
83 83
         </div>
84 84
         """
85
-        response = mock.Mock(text=html)
85
+        response = mock.Mock(content=html)
86 86
         results = btdigg.response(response)
87 87
         self.assertEqual(type(results), list)
88 88
         self.assertEqual(len(results), 1)
@@ -101,7 +101,7 @@ class TestBtdiggEngine(SearxTestCase):
101 101
             </table>
102 102
         </div>
103 103
         """
104
-        response = mock.Mock(text=html)
104
+        response = mock.Mock(content=html)
105 105
         results = btdigg.response(response)
106 106
         self.assertEqual(type(results), list)
107 107
         self.assertEqual(len(results), 0)
@@ -367,7 +367,7 @@ class TestBtdiggEngine(SearxTestCase):
367 367
             </table>
368 368
         </div>
369 369
         """
370
-        response = mock.Mock(text=html)
370
+        response = mock.Mock(content=html)
371 371
         results = btdigg.response(response)
372 372
         self.assertEqual(type(results), list)
373 373
         self.assertEqual(len(results), 5)