当前位置: 首页>>代码示例>>Python>>正文


Python YouTubePlaylistControl.YouTubePlaylistControl类代码示例

本文整理汇总了Python中YouTubePlaylistControl.YouTubePlaylistControl的典型用法代码示例。如果您正苦于以下问题:Python YouTubePlaylistControl类的具体用法?Python YouTubePlaylistControl怎么用?Python YouTubePlaylistControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了YouTubePlaylistControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_addToPlaylist_should_call_core_add_to_playlist_if_playlist_is_in_params

 def test_addToPlaylist_should_call_core_add_to_playlist_if_playlist_is_in_params(self):
     control = YouTubePlaylistControl()
     control.createPlayList = Mock()
     
     control.addToPlaylist({"playlist":"playlist1"})
     
     sys.modules["__main__"].core.add_to_playlist.assert_called_with({'playlist': 'playlist1'})
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:7,代码来源:TestYouTubePlaylistControl.py

示例2: test_deletePlaylist_should_call_core_delete_playlist

 def test_deletePlaylist_should_call_core_delete_playlist(self):
     sys.modules["__main__"].core.del_playlist.return_value = ("",200)
     control = YouTubePlaylistControl()
     
     control.deletePlaylist({"playlist":"some_playlist"})
     
     sys.modules["__main__"].core.del_playlist.assert_called_with({"playlist":"some_playlist"})
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:7,代码来源:TestYouTubePlaylistControl.py

示例3: test_removeFromPlaylist_should_call_core_remove_from_playlist

    def test_removeFromPlaylist_should_call_core_remove_from_playlist(self):
        sys.modules["__main__"].core.remove_from_playlist.return_value = ("",200)
        control = YouTubePlaylistControl()

        control.removeFromPlaylist({"playlist_entry_id":"some_playlist_entry_id", "playlist":"some_playlist"})
        
        sys.modules["__main__"].core.remove_from_playlist.assert_called_with({"playlist_entry_id":"some_playlist_entry_id", "playlist":"some_playlist"})
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:7,代码来源:TestYouTubePlaylistControl.py

示例4: test_removeFromPlaylist_should_call_xbmc_execute_builtin_on_success

 def test_removeFromPlaylist_should_call_xbmc_execute_builtin_on_success(self):
     control = YouTubePlaylistControl()
     sys.modules["__main__"].core.remove_from_playlist.return_value = ("",200)
     
     control.removeFromPlaylist({"playlist_entry_id":"some_playlist_entry_id", "playlist":"some_playlist"})
     
     sys.modules["__main__"].xbmc.executebuiltin.assert_called_with("Container.Refresh")
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:7,代码来源:TestYouTubePlaylistControl.py

示例5: test_deletePlaylist_should_call_xbmc_execute_builtin_on_success

 def test_deletePlaylist_should_call_xbmc_execute_builtin_on_success(self):
     sys.modules["__main__"].core.del_playlist.return_value = ("",200)
     control = YouTubePlaylistControl()
     
     control.deletePlaylist({"playlist":"some_playlist_id"})
     
     sys.modules["__main__"].xbmc.executebuiltin.assert_called_with("Container.Refresh")	
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:7,代码来源:TestYouTubePlaylistControl.py

示例6: test_getUserFeed_should_exit_cleanly_if_contact_is_missing

 def test_getUserFeed_should_exit_cleanly_if_contact_is_missing(self):
     sys.modules["__main__"].feeds.listAll.return_value = ("",200)
     control = YouTubePlaylistControl()
     
     control.getUserFeed({"user_feed":"favorites"})
     
     assert(sys.modules["__main__"].feeds.listAll.call_count == 0)
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:7,代码来源:TestYouTubePlaylistControl.py

示例7: test_playAll_should_not_call_xbmc_player_if_params_is_empty

 def test_playAll_should_not_call_xbmc_player_if_params_is_empty(self):
     control = YouTubePlaylistControl()
     
     control.playAll({})
     
     assert(sys.modules["__main__"].xbmc.Player.call_count == 0)
     assert(sys.modules["__main__"].xbmc.Player().call_count == 0)
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:7,代码来源:TestYouTubePlaylistControl.py

示例8: test_deletePlaylist_should_exit_cleanly_if_playlist_is_missing

 def test_deletePlaylist_should_exit_cleanly_if_playlist_is_missing(self):
     sys.modules["__main__"].core.remove_from_playlist.return_value = ("",200)
     control = YouTubePlaylistControl()
     
     control.deletePlaylist({})
     
     assert(sys.modules["__main__"].core.del_playlist.call_count == 0)
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:7,代码来源:TestYouTubePlaylistControl.py

示例9: test_playAll_should_call_getDiscoSearch_if_scraper_is_disco_search_in_params

    def test_playAll_should_call_getDiscoSearch_if_scraper_is_disco_search_in_params(self):
        control = YouTubePlaylistControl()
        sys.modules["__main__"].scraper.searchDisco.return_value = ("", 200)
        
        control.playAll({"scraper":"search_disco", "search":"some_search"})

        sys.modules["__main__"].scraper.searchDisco.assert_called_with({"scraper":"search_disco", "search":"some_search", "fetch_all" : "true"})
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:7,代码来源:TestYouTubePlaylistControl.py

示例10: test_playAll_should_call_getUserFeed_if_user_feed_is_subscriptions_in_params

 def test_playAll_should_call_getUserFeed_if_user_feed_is_subscriptions_in_params(self):
     control = YouTubePlaylistControl()
     control.getUserFeed = Mock()
     control.getUserFeed.return_value = ""
     
     control.playAll({"user_feed":"newsubscriptions"})
     
     control.getUserFeed.assert_called_with({"user_feed":"newsubscriptions", 'login':"true", 'fetch_all': 'true'})
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:8,代码来源:TestYouTubePlaylistControl.py

示例11: test_deletePlaylist_should_show_error_message_if_delete_call_failed

 def test_deletePlaylist_should_show_error_message_if_delete_call_failed(self):
     sys.modules["__main__"].core.del_playlist.return_value = ("fail",303)
     sys.modules["__main__"].language.return_value = "my_string"
     control = YouTubePlaylistControl()
     
     control.deletePlaylist({"playlist":"some_playlist"})
     
     sys.modules["__main__"].utils.showErrorMessage.assert_called_with("my_string","fail",303)
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:8,代码来源:TestYouTubePlaylistControl.py

示例12: test_addToPlaylist_should_call_list_all_if_playlist_is_not_in_params

 def test_addToPlaylist_should_call_list_all_if_playlist_is_not_in_params(self):
     sys.modules["__main__"].feeds.listAll.return_value = ([])
     control = YouTubePlaylistControl()
     
     control.addToPlaylist({})
     
     sys.modules["__main__"].feeds.listAll.assert_called_with({'user_feed': 'playlists', 'login': 'true', 'folder': 'true'})
     assert(sys.modules["__main__"].feeds.listAll.call_count == 1)
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:8,代码来源:TestYouTubePlaylistControl.py

示例13: test_getLikedVideos_should_call_core_getBatchDetails_if_scraper_succeded

 def test_getLikedVideos_should_call_core_getBatchDetails_if_scraper_succeded(self):
     sys.modules["__main__"].scraper.scrapeUserLikedVideos.return_value = ("",200)
     sys.modules["__main__"].core.getBatchDetails.return_value = ("",200)
     control = YouTubePlaylistControl()
     
     control.getLikedVideos({"login":"true","scraper":"liked_videos"})
     
     sys.modules["__main__"].scraper.scrapeUserLikedVideos.assert_called_with({"login":"true","scraper":"liked_videos"})
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:8,代码来源:TestYouTubePlaylistControl.py

示例14: test_getYouTubeTop100_should_call_getBatchDetails

    def test_getYouTubeTop100_should_call_getBatchDetails(self):
        sys.modules["__main__"].scraper.scrapeYouTubeTop100.return_value = ("",200)
        sys.modules["__main__"].core.getBatchDetails.return_value = ("",200)
        control = YouTubePlaylistControl()
        
        control.getYouTubeTop100({})

        assert(sys.modules["__main__"].core.getBatchDetails.call_count == 1)
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:8,代码来源:TestYouTubePlaylistControl.py

示例15: test_getUserFeed_should_call_core_list_all_with_correct_params

 def test_getUserFeed_should_call_core_list_all_with_correct_params(self):
     sys.modules["__main__"].feeds.listAll.return_value = ("",200)
     control = YouTubePlaylistControl()
     
     control.getUserFeed({"contact":"some_contact", "user_feed":"favorites"})
     
     assert(sys.modules["__main__"].feeds.listAll.call_count == 1)
     sys.modules["__main__"].feeds.listAll.assert_called_with({"user_feed":"favorites","contact":"some_contact"})
开发者ID:BlackSmith,项目名称:youtube-xbmc-plugin,代码行数:8,代码来源:TestYouTubePlaylistControl.py


注:本文中的YouTubePlaylistControl.YouTubePlaylistControl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。