本文整理汇总了Python中BlipTVNavigation.BlipTVNavigation.executeAction方法的典型用法代码示例。如果您正苦于以下问题:Python BlipTVNavigation.executeAction方法的具体用法?Python BlipTVNavigation.executeAction怎么用?Python BlipTVNavigation.executeAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlipTVNavigation.BlipTVNavigation
的用法示例。
在下文中一共展示了BlipTVNavigation.executeAction方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_executeAction_should_call_listMenu_if_action_is_edit_search
# 需要导入模块: from BlipTVNavigation import BlipTVNavigation [as 别名]
# 或者: from BlipTVNavigation.BlipTVNavigation import executeAction [as 别名]
def test_executeAction_should_call_listMenu_if_action_is_edit_search(self):
navigation = BlipTVNavigation()
navigation.listMenu = Mock()
navigation.executeAction({"action": "edit_search"})
navigation.listMenu.assert_called_with({"action": "edit_search"})
示例2: test_executeAction_should_call_storage_editStoredSearch_if_action_is_edit_search
# 需要导入模块: from BlipTVNavigation import BlipTVNavigation [as 别名]
# 或者: from BlipTVNavigation.BlipTVNavigation import executeAction [as 别名]
def test_executeAction_should_call_storage_editStoredSearch_if_action_is_edit_search(self):
navigation = BlipTVNavigation()
navigation.listMenu = Mock()
navigation.executeAction({"action": "edit_search"})
sys.modules["__main__"].storage.editStoredSearch.assert_called_with({"action": "edit_search"})
示例3: test_executeAction_should_call_addToFavorites_if_action_is_add_favorite
# 需要导入模块: from BlipTVNavigation import BlipTVNavigation [as 别名]
# 或者: from BlipTVNavigation.BlipTVNavigation import executeAction [as 别名]
def test_executeAction_should_call_addToFavorites_if_action_is_add_favorite(self):
sys.modules["__main__"].scraper.addShowToMyFavorites = Mock()
navigation = BlipTVNavigation()
navigation.addToFavorites = Mock()
navigation.executeAction({"action": "add_favorite"})
sys.modules["__main__"].scraper.addShowToMyFavorites.assert_called_with({"action": "add_favorite"})
示例4: test_executeAction_should_open_settings_if_action_is_settings
# 需要导入模块: from BlipTVNavigation import BlipTVNavigation [as 别名]
# 或者: from BlipTVNavigation.BlipTVNavigation import executeAction [as 别名]
def test_executeAction_should_open_settings_if_action_is_settings(self):
sys.modules["__main__"].storage.deleteFromMyFavoriteShows = Mock()
navigation = BlipTVNavigation()
navigation.removeFromFavorites = Mock()
navigation.executeAction({"action": "settings"})
sys.modules["__main__"].settings.openSettings.assert_called_with()
示例5: test_executeAction_should_call_removeFromFavorites_if_action_is_remove_favorite
# 需要导入模块: from BlipTVNavigation import BlipTVNavigation [as 别名]
# 或者: from BlipTVNavigation.BlipTVNavigation import executeAction [as 别名]
def test_executeAction_should_call_removeFromFavorites_if_action_is_remove_favorite(self):
sys.modules["__main__"].storage.deleteFromMyFavoriteShows = Mock()
navigation = BlipTVNavigation()
navigation.removeFromFavorites = Mock()
navigation.executeAction({"action": "delete_favorite"})
sys.modules["__main__"].storage.deleteFromMyFavoriteShows.assert_called_with({"action": "delete_favorite"})
示例6: test_executeAction_should_call_downloader_downloadVideo_if_action_is_download
# 需要导入模块: from BlipTVNavigation import BlipTVNavigation [as 别名]
# 或者: from BlipTVNavigation.BlipTVNavigation import executeAction [as 别名]
def test_executeAction_should_call_downloader_downloadVideo_if_action_is_download(self):
sys.modules["__main__"].player.getVideoObject = Mock()
sys.modules["__main__"].player.getVideoObject.return_value = {"videoid": "video1", "video_url": "Mock url", "Title": "Mock Title"}
sys.modules["__main__"].settings.getSetting.return_value = "some_path"
navigation = BlipTVNavigation()
navigation.executeAction({"action": "download"})
sys.modules["__main__"].downloader.download.assert_called_with("Mock Title-[video1].mp4", {"action": "download", "url": "Mock url", "download_path": "some_path", "useragent": "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3"})
示例7: ttest_executeAction_should_call_playlist_playAll_if_action_is_play_all
# 需要导入模块: from BlipTVNavigation import BlipTVNavigation [as 别名]
# 或者: from BlipTVNavigation.BlipTVNavigation import executeAction [as 别名]
def ttest_executeAction_should_call_playlist_playAll_if_action_is_play_all(self):
navigation = BlipTVNavigation()
navigation.executeAction({"action": "play_all"})
sys.modules["__main__"].playlist.playAll.assert_called_with({"action": "play_all"})
示例8: ttest_executeAction_should_call_playlist_queueVideo_if_action_is_queue_video
# 需要导入模块: from BlipTVNavigation import BlipTVNavigation [as 别名]
# 或者: from BlipTVNavigation.BlipTVNavigation import executeAction [as 别名]
def ttest_executeAction_should_call_playlist_queueVideo_if_action_is_queue_video(self):
navigation = BlipTVNavigation()
navigation.executeAction({"action": "queue_video"})
sys.modules["__main__"].playlist.queueVideo.assert_called_with({"action": "queue_video"})
示例9: test_executeAction_should_call_player_playVideo_if_action_is_play_video
# 需要导入模块: from BlipTVNavigation import BlipTVNavigation [as 别名]
# 或者: from BlipTVNavigation.BlipTVNavigation import executeAction [as 别名]
def test_executeAction_should_call_player_playVideo_if_action_is_play_video(self):
navigation = BlipTVNavigation()
navigation.executeAction({"action": "play_video"})
sys.modules["__main__"].player.playVideo.assert_called_with({"action": "play_video"})
示例10: test_executeAction_should_call_storage_deleteStoredSearch_if_action_is_delete_search
# 需要导入模块: from BlipTVNavigation import BlipTVNavigation [as 别名]
# 或者: from BlipTVNavigation.BlipTVNavigation import executeAction [as 别名]
def test_executeAction_should_call_storage_deleteStoredSearch_if_action_is_delete_search(self):
navigation = BlipTVNavigation()
navigation.executeAction({"action": "delete_search"})
sys.modules["__main__"].storage.deleteStoredSearch.assert_called_with({"action": "delete_search"})