本文整理匯總了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"})