mirror of
https://github.com/beetbox/beets.git
synced 2026-02-18 05:17:31 +01:00
lastgenre: Adapt existing tests to refactor
This commit is contained in:
parent
65c00f3751
commit
0c21098ec0
1 changed files with 5 additions and 5 deletions
|
|
@ -184,9 +184,9 @@ class LastGenrePluginTest(PluginTestCase):
|
|||
return [tag1, tag2]
|
||||
|
||||
plugin = lastgenre.LastGenrePlugin()
|
||||
res = plugin._tags_for(MockPylastObj())
|
||||
res = plugin.client._tags_for(MockPylastObj())
|
||||
assert res == ["pop", "rap"]
|
||||
res = plugin._tags_for(MockPylastObj(), min_weight=50)
|
||||
res = plugin.client._tags_for(MockPylastObj(), min_weight=50)
|
||||
assert res == ["pop"]
|
||||
|
||||
def test_sort_by_depth(self):
|
||||
|
|
@ -583,9 +583,9 @@ def test_get_genre(config_values, item_genre, mock_genres, expected_result):
|
|||
# Mock the last.fm fetchers. When whitelist enabled, we can assume only
|
||||
# whitelisted genres get returned, the plugin's _resolve_genre method
|
||||
# ensures it.
|
||||
lastgenre.LastGenrePlugin.fetch_track_genre = mock_fetch_track_genre
|
||||
lastgenre.LastGenrePlugin.fetch_album_genre = mock_fetch_album_genre
|
||||
lastgenre.LastGenrePlugin.fetch_artist_genre = mock_fetch_artist_genre
|
||||
lastgenre.client.LastFmClient.fetch_track_genre = mock_fetch_track_genre
|
||||
lastgenre.client.LastFmClient.fetch_album_genre = mock_fetch_album_genre
|
||||
lastgenre.client.LastFmClient.fetch_artist_genre = mock_fetch_artist_genre
|
||||
|
||||
# Initialize plugin instance and item
|
||||
plugin = lastgenre.LastGenrePlugin()
|
||||
|
|
|
|||
Loading…
Reference in a new issue