Esempio n. 1
0
 def test_extract_source_multiple_canceled(self):
     YDStreamExtractor.mode = 1  # multiple
     with mock_select_dialog(-1):
         ret = self.resolver.extract_source("url")
     self.assertIsNone(ret)
Esempio n. 2
0
 def test_top_skip(self):
     with testing.mock_select_dialog(-1):
         data = addon.top_videos.test()
     self.assertFalse(data)
Esempio n. 3
0
 def test_extract_source_multiple(self):
     YDStreamExtractor.mode = 1  # multiple
     with mock_select_dialog(0):
         ret = self.resolver.extract_source("url")
     self.assertEqual(ret, "video.mkv")
Esempio n. 4
0
 def test_top_alternative(self):
     with testing.mock_select_dialog(2):
         data = addon.top_videos.test()
     self.assertGreaterEqual(len(data), 30)
Esempio n. 5
0
 def test_top_death_metal(self):
     with testing.mock_select_dialog(5):
         data = addon.top_videos.test()
     self.assertGreaterEqual(len(data), 15)
 def test_top_converts(self):
     with testing.mock_select_dialog(5):
         data = addon.top_videos.test()
     self.assertGreaterEqual(len(data), 50)
 def test_extract_source_multiple_canceled(self):
     YDStreamExtractor.mode = 1  # multiple
     with mock_select_dialog(-1):
         ret = self.resolver.extract_source("url")
     self.assertIsNone(ret)
 def test_extract_source_multiple(self):
     YDStreamExtractor.mode = 1  # multiple
     with mock_select_dialog(0):
         ret = self.resolver.extract_source("url")
     self.assertEqual(ret, "video.mkv")