From 3ef8533f4d402457808e9d9fb52af982abb8112f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Sat, 10 Feb 2018 20:03:55 +0100 Subject: [PATCH] fix unit tests --- tests/unit/engines/test_bing_videos.py | 103 +++++++++---------------- 1 file changed, 35 insertions(+), 68 deletions(-) diff --git a/tests/unit/engines/test_bing_videos.py b/tests/unit/engines/test_bing_videos.py index 118754b2..8b303d63 100644 --- a/tests/unit/engines/test_bing_videos.py +++ b/tests/unit/engines/test_bing_videos.py @@ -47,87 +47,54 @@ class TestBingVideosEngine(SearxTestCase): self.assertEqual(bing_videos.response(response), []) html = """ -
-
- -
-
+
+
+ +
+
-
""" response = mock.Mock(text=html) results = bing_videos.response(response) self.assertEqual(type(results), list) self.assertEqual(len(results), 1) self.assertEqual(results[0]['title'], 'Title 1') - self.assertEqual(results[0]['url'], 'https://url.com/1') - self.assertEqual(results[0]['content'], 'Content 1') - self.assertEqual(results[0]['thumbnail'], 'thumb_1.jpg') - - html = """ - - """ - response = mock.Mock(text=html) - results = bing_videos.response(response) - self.assertEqual(type(results), list) - self.assertEqual(len(results), 1) - self.assertEqual(results[0]['title'], 'Title 1') - self.assertEqual(results[0]['url'], 'https://url.com/1') + self.assertEqual(results[0]['url'], 'https://bing.com/video') self.assertEqual(results[0]['content'], 'Content 1') self.assertEqual(results[0]['thumbnail'], 'thumb_1.jpg')