Fix/add lastgenre fallback tests

This commit is contained in:
J0J0 Todos 2025-01-06 00:53:41 +01:00
parent 50e2619ed2
commit b4590ec3e0

View file

@ -296,7 +296,7 @@ class LastGenrePluginTest(BeetsTestCase):
}, },
("Unknown Genre, Jazz", "keep + artist"), ("Unknown Genre, Jazz", "keep + artist"),
), ),
# 7 - fallback to fallback when nothing found # 7 - fallback to original when nothing found
( (
{ {
"force": True, "force": True,
@ -313,9 +313,28 @@ class LastGenrePluginTest(BeetsTestCase):
"album": None, "album": None,
"artist": None, "artist": None,
}, },
("original unknown", "original fallback"),
),
# 8 - fallback to fallback if no original
(
{
"force": True,
"keep_existing": True,
"source": "track",
"whitelist": True,
"fallback": "fallback genre",
"canonical": False,
"prefer_specific": False,
},
"",
{
"track": None,
"album": None,
"artist": None,
},
("fallback genre", "fallback"), ("fallback genre", "fallback"),
), ),
# 8 - null charachter as separator # 9 - null charachter as separator
( (
{ {
"force": True, "force": True,
@ -332,7 +351,7 @@ class LastGenrePluginTest(BeetsTestCase):
}, },
("Blues\u0000Jazz", "keep + album"), ("Blues\u0000Jazz", "keep + album"),
), ),
# 9 - limit a lot of results to just 3 # 10 - limit a lot of results to just 3
( (
{ {
"force": True, "force": True,