Пример #1
0
 def test_get_youtube_video_content_true_override(self):
     """Test query_youtube.get_youtube_content with error override
     for a video url"""
     override_error = True
     youtube_video_dict = query_youtube.get_youtube_content(
         self.video_url, override_error)
     self.assertIsInstance(youtube_video_dict, dict)
Пример #2
0
 def test_get_youtube_video_content_false_override(self):
     """Test query_youtube.get_youtube_content with false error override
     for a video url"""
     override_error = False
     try:
         youtube_video_dict = query_youtube.get_youtube_content(
             self.video_url, override_error)
     except RuntimeError:
         youtube_video_dict = {}
     self.assertIsInstance(youtube_video_dict, dict)
Пример #3
0
 def test_get_youtube_playlist_content_false_override(self):
     """Test query_youtube.get_youtube_content with false error override
     for a playlist url"""
     override_error = False
     try:
         youtube_video_dict = query_youtube.get_youtube_content(
             self.playlist_url, override_error)
     except RuntimeError:  # successfully threw RuntimeError
         youtube_video_dict = {}
     self.assertIsInstance(youtube_video_dict, dict)