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


Python YouTubeFeeds.list方法代码示例

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


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

示例1: test_list_should_call_listPlaylist_if_playlist_is_in_params

# 需要导入模块: from YouTubeFeeds import YouTubeFeeds [as 别名]
# 或者: from YouTubeFeeds.YouTubeFeeds import list [as 别名]
    def test_list_should_call_listPlaylist_if_playlist_is_in_params(self):
        sys.modules["__main__"].settings.getSetting.return_value = "1"
        feeds = YouTubeFeeds()
        feeds.listPlaylist = Mock()
        
        result = feeds.list({"playlist": "some_playlist"})

        print repr(result)

        feeds.listPlaylist.assert_called_with({"playlist": "some_playlist"})
开发者ID:1c0n,项目名称:youtube-xbmc-plugin,代码行数:12,代码来源:TestYouTubeFeeds.py

示例2: test_list_should_call_listFolder_if_folder_is_in_params

# 需要导入模块: from YouTubeFeeds import YouTubeFeeds [as 别名]
# 或者: from YouTubeFeeds.YouTubeFeeds import list [as 别名]
    def test_list_should_call_listFolder_if_folder_is_in_params(self):
        sys.modules["__main__"].pluginsettings.itemsPerPage.return_value = 15
        feeds = YouTubeFeeds()
        feeds.listFolder = Mock()
        
        result = feeds.list({"folder": "true"})

        print repr(result)

        feeds.listFolder.assert_called_with({"folder": "true"})
开发者ID:1c0n,项目名称:youtube-xbmc-plugin,代码行数:12,代码来源:TestYouTubeFeeds.py

示例3: test_list_should_call_core_getAuth_to_test_if_login_is_set_if_login_is_in_params

# 需要导入模块: from YouTubeFeeds import YouTubeFeeds [as 别名]
# 或者: from YouTubeFeeds.YouTubeFeeds import list [as 别名]
    def test_list_should_call_core_getAuth_to_test_if_login_is_set_if_login_is_in_params(self):
        sys.modules["__main__"].settings.getSetting.return_value = "1"
        feeds = YouTubeFeeds()
        feeds.listPlaylist = Mock()
        feeds.listFolder = Mock()
        feeds.createUrl = Mock()
        sys.modules["__main__"].core._fetchPage.return_value = {"content": "some_content", "status": 200}
        sys.modules["__main__"].core.getVideoInfo.return_value = []
        result = feeds.list({"login": "true"})

        print repr(result)

        sys.modules["__main__"].core._getAuth.assert_called_with()
开发者ID:1c0n,项目名称:youtube-xbmc-plugin,代码行数:15,代码来源:TestYouTubeFeeds.py

示例4: test_list_should_return_error_status_if_video_list_is_empty

# 需要导入模块: from YouTubeFeeds import YouTubeFeeds [as 别名]
# 或者: from YouTubeFeeds.YouTubeFeeds import list [as 别名]
    def test_list_should_return_error_status_if_video_list_is_empty(self):
        sys.modules["__main__"].settings.getSetting.return_value = "1"
        sys.modules["__main__"].core._fetchPage.return_value = {"content": "some_fail", "status": 200}
        sys.modules["__main__"].core.getVideoInfo.return_value = []
        sys.modules["__main__"].language.return_value = "some_string"
        feeds = YouTubeFeeds()
        feeds.listPlaylist = Mock()
        feeds.listFolder = Mock()
        feeds.createUrl = Mock()
        feeds.createUrl.return_value = "some_url"
	
        result = feeds.list()
        
        assert(result == ([], 303))
开发者ID:1c0n,项目名称:youtube-xbmc-plugin,代码行数:16,代码来源:TestYouTubeFeeds.py

示例5: test_list_should_call_createUrl_to_fetch_url

# 需要导入模块: from YouTubeFeeds import YouTubeFeeds [as 别名]
# 或者: from YouTubeFeeds.YouTubeFeeds import list [as 别名]
    def test_list_should_call_createUrl_to_fetch_url(self):
        sys.modules["__main__"].settings.getSetting.return_value = "1"
        sys.modules["__main__"].core._fetchPage.return_value = {"content": "some_content", "status": 200}
        sys.modules["__main__"].core.getVideoInfo.return_value = []
        sys.modules["__main__"].language.return_value = "some_string"
        feeds = YouTubeFeeds()
        feeds.listPlaylist = Mock()
        feeds.listFolder = Mock()
        feeds.createUrl = Mock()
        result = feeds.list()

        print repr(result)

        feeds.createUrl.assert_called_with({})
开发者ID:1c0n,项目名称:youtube-xbmc-plugin,代码行数:16,代码来源:TestYouTubeFeeds.py

示例6: test_list_should_return_error_message_if_login_is_not_set_and_login_is_in_params

# 需要导入模块: from YouTubeFeeds import YouTubeFeeds [as 别名]
# 或者: from YouTubeFeeds.YouTubeFeeds import list [as 别名]
 def test_list_should_return_error_message_if_login_is_not_set_and_login_is_in_params(self):
     sys.modules["__main__"].settings.getSetting.return_value = "1"
     sys.modules["__main__"].core._fetchPage.return_value = {"content": "some_content", "status": 200}
     sys.modules["__main__"].core.getVideoInfo.return_value = []
     sys.modules["__main__"].core._getAuth.return_value = False
     sys.modules["__main__"].language.return_value = "some_string"
     feeds = YouTubeFeeds()
     feeds.listPlaylist = Mock()
     feeds.listFolder = Mock()
     feeds.createUrl = Mock()
     result = feeds.list({"login": "true"})
     
     assert(result == ("some_string", 303))
     sys.modules["__main__"].language.assert_called_with(30609)
开发者ID:1c0n,项目名称:youtube-xbmc-plugin,代码行数:16,代码来源:TestYouTubeFeeds.py

示例7: test_list_should_call_storage_store_to_save_first_thumbnail_in_list

# 需要导入模块: from YouTubeFeeds import YouTubeFeeds [as 别名]
# 或者: from YouTubeFeeds.YouTubeFeeds import list [as 别名]
    def test_list_should_call_storage_store_to_save_first_thumbnail_in_list(self):
        sys.modules["__main__"].settings.getSetting.return_value = "1"
        sys.modules["__main__"].core._fetchPage.return_value = {"content": "some_fail", "status": 200}
        sys.modules["__main__"].core.getVideoInfo.return_value = [{"videoid": "some_id", "thumbnail": "some_thumb"}]
        sys.modules["__main__"].language.return_value = "some_string"
        feeds = YouTubeFeeds()
        feeds.listPlaylist = Mock()
        feeds.listFolder = Mock()
        feeds.createUrl = Mock()
        feeds.createUrl.return_value = "some_url"
	
        result = feeds.list()

        print repr(result)

        sys.modules["__main__"].storage.store.assert_called_with({}, "some_thumb", "thumbnail")
开发者ID:1c0n,项目名称:youtube-xbmc-plugin,代码行数:18,代码来源:TestYouTubeFeeds.py

示例8: test_list_should_call_core_getVideoInfo_if_fetchPage_succeded_and_folder_is_not_in_params

# 需要导入模块: from YouTubeFeeds import YouTubeFeeds [as 别名]
# 或者: from YouTubeFeeds.YouTubeFeeds import list [as 别名]
    def test_list_should_call_core_getVideoInfo_if_fetchPage_succeded_and_folder_is_not_in_params(self):
        sys.modules["__main__"].settings.getSetting.return_value = "1"
        sys.modules["__main__"].core._fetchPage.return_value = {"content": "some_fail", "status": 200}
        sys.modules["__main__"].core.getVideoInfo.return_value = []
        sys.modules["__main__"].language.return_value = "some_string"
        feeds = YouTubeFeeds()
        feeds.listPlaylist = Mock()
        feeds.listFolder = Mock()
        feeds.createUrl = Mock()
        feeds.createUrl.return_value = "some_url"
	
        result = feeds.list()

        print repr(result)

        sys.modules["__main__"].core.getVideoInfo.assert_called_with("some_fail", {})
开发者ID:1c0n,项目名称:youtube-xbmc-plugin,代码行数:18,代码来源:TestYouTubeFeeds.py


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