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


Python YouTubeStorage.getStoredArtists方法代码示例

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


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

示例1: test_getStoredArtists_should_call_retrieve_to_get_list_of_artists

# 需要导入模块: from YouTubeStorage import YouTubeStorage [as 别名]
# 或者: from YouTubeStorage.YouTubeStorage import getStoredArtists [as 别名]
    def test_getStoredArtists_should_call_retrieve_to_get_list_of_artists(self):
        storage = YouTubeStorage()
        storage.retrieve = Mock()
        storage.retrieve.return_value = []
        # storage.retrieve.return_value = [("some_title", "some_artist")]

        storage.getStoredArtists({"store": "somestore"})

        storage.retrieve.assert_called_with({"store": "somestore"})
开发者ID:jmbreuer,项目名称:xbmc-youtube_legacy,代码行数:11,代码来源:TestYouTubeStorage.py

示例2: test_list_should_call_getStoredArtists_if_store_artist_is_in_params

# 需要导入模块: from YouTubeStorage import YouTubeStorage [as 别名]
# 或者: from YouTubeStorage.YouTubeStorage import getStoredArtists [as 别名]
    def test_list_should_call_getStoredArtists_if_store_artist_is_in_params(self):
        storage = YouTubeStorage()
        storage.getStoredArtists = Mock()
        storage.getStoredArtists.return_value = ("", 200)

        storage.list({"store": "artists"})

        storage.getStoredArtists.assert_called_with({"store": "artists"})
开发者ID:aerickson,项目名称:youtube-xbmc-plugin,代码行数:10,代码来源:TestYouTubeStorage.py

示例3: test_getStoredArtists_should_call_retrieve_to_get_artist_thumbnails

# 需要导入模块: from YouTubeStorage import YouTubeStorage [as 别名]
# 或者: from YouTubeStorage.YouTubeStorage import getStoredArtists [as 别名]
    def test_getStoredArtists_should_call_retrieve_to_get_artist_thumbnails(self):
        storage = YouTubeStorage()
        storage.retrieve = Mock()
        storage.retrieve.return_value = [("some_title", "some_artist")]

        storage.getStoredArtists({"path": "some_path", "store": "somestore"})

        storage.retrieve.assert_called_with(
            {"path": "some_path", "store": "somestore"},
            "thumbnail",
            {
                "artist": "some_artist",
                "Title": "some_title",
                "scraper": "music_artist",
                "path": "some_path",
                "thumbnail": [("some_title", "some_artist")],
                "icon": "music",
            },
        )
开发者ID:jmbreuer,项目名称:xbmc-youtube_legacy,代码行数:21,代码来源:TestYouTubeStorage.py

示例4: test_getStoredArtists_should_return_proper_list_structure

# 需要导入模块: from YouTubeStorage import YouTubeStorage [as 别名]
# 或者: from YouTubeStorage.YouTubeStorage import getStoredArtists [as 别名]
    def test_getStoredArtists_should_return_proper_list_structure(self):
        storage = YouTubeStorage()
        storage.retrieve = Mock()
        storage.retrieve.return_value = [("some_title", "some_artist")]

        (result, status) = storage.getStoredArtists({"path": "some_path", "store": "somestore"})
        assert result[0]["artist"] == "some_artist"
        assert result[0]["Title"] == "some_title"
        assert result[0]["scraper"] == "music_artist"
        assert result[0].has_key("icon")
        assert result[0].has_key("thumbnail")
开发者ID:jmbreuer,项目名称:xbmc-youtube_legacy,代码行数:13,代码来源:TestYouTubeStorage.py


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