本文整理汇总了Python中YouTubePlaylistControl.YouTubePlaylistControl.removeFromPlaylist方法的典型用法代码示例。如果您正苦于以下问题:Python YouTubePlaylistControl.removeFromPlaylist方法的具体用法?Python YouTubePlaylistControl.removeFromPlaylist怎么用?Python YouTubePlaylistControl.removeFromPlaylist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类YouTubePlaylistControl.YouTubePlaylistControl
的用法示例。
在下文中一共展示了YouTubePlaylistControl.removeFromPlaylist方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_removeFromPlaylist_should_call_xbmc_execute_builtin_on_success
# 需要导入模块: from YouTubePlaylistControl import YouTubePlaylistControl [as 别名]
# 或者: from YouTubePlaylistControl.YouTubePlaylistControl import removeFromPlaylist [as 别名]
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")
示例2: test_removeFromPlaylist_should_call_core_remove_from_playlist
# 需要导入模块: from YouTubePlaylistControl import YouTubePlaylistControl [as 别名]
# 或者: from YouTubePlaylistControl.YouTubePlaylistControl import removeFromPlaylist [as 别名]
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"})
示例3: test_removeFromPlaylist_should_show_error_message_if_remove_call_failed
# 需要导入模块: from YouTubePlaylistControl import YouTubePlaylistControl [as 别名]
# 或者: from YouTubePlaylistControl.YouTubePlaylistControl import removeFromPlaylist [as 别名]
def test_removeFromPlaylist_should_show_error_message_if_remove_call_failed(self):
sys.modules["__main__"].core.remove_from_playlist.return_value = ("fail",303)
sys.modules["__main__"].language.return_value = "my_string"
control = YouTubePlaylistControl()
control.removeFromPlaylist({"playlist_entry_id":"some_playlist_entry_id", "playlist":"some_playlist"})
sys.modules["__main__"].utils.showErrorMessage.assert_called_with("my_string","fail",303)
示例4: test_removeFromPlaylist_should_exit_cleanly_if_playlist_or_playlist_entry_id_is_missing
# 需要导入模块: from YouTubePlaylistControl import YouTubePlaylistControl [as 别名]
# 或者: from YouTubePlaylistControl.YouTubePlaylistControl import removeFromPlaylist [as 别名]
def test_removeFromPlaylist_should_exit_cleanly_if_playlist_or_playlist_entry_id_is_missing(self):
control = YouTubePlaylistControl()
control.removeFromPlaylist({})
assert(sys.modules["__main__"].core.remove_from_playlist.call_count == 0)