Skip to content

Commit

Permalink
Fix test_get_genrer - configure first
Browse files Browse the repository at this point in the history
otherwise self.whitelist is "set up" before the test cases config is
set.
  • Loading branch information
JOJ0 committed Jan 21, 2025
1 parent bea5aa2 commit 819239d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/plugins/test_lastgenre.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,16 +390,14 @@ def mock_fetch_artist_genre(self, obj):
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
print("test test")
print(plugin.whitelist)
res = plugin._get_genre(item)
assert res == expected_result

0 comments on commit 819239d

Please sign in to comment.