mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
Fix test_get_genrer - configure first
otherwise self.whitelist is "set up" before the test cases config is set.
This commit is contained in:
parent
92e84a2b45
commit
34b9021772
1 changed files with 3 additions and 3 deletions
|
|
@ -390,14 +390,14 @@ def test_get_genre(config_values, item_genre, mock_genres, expected_result):
|
|||
lastgenre.LastGenrePlugin.fetch_album_genre = mock_fetch_album_genre
|
||||
lastgenre.LastGenrePlugin.fetch_artist_genre = mock_fetch_artist_genre
|
||||
|
||||
# Configure
|
||||
config["lastgenre"] = config_values
|
||||
|
||||
# Initialize plugin instance and item
|
||||
plugin = lastgenre.LastGenrePlugin()
|
||||
item = _common.item()
|
||||
item.genre = item_genre
|
||||
|
||||
# Configure
|
||||
config["lastgenre"] = config_values
|
||||
|
||||
# Run
|
||||
res = plugin._get_genre(item)
|
||||
assert res == expected_result
|
||||
|
|
|
|||
Loading…
Reference in a new issue