feat: add real MusicBrainz resolver and opt-in live test
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from lyra_worker._musicbrainz import MusicBrainzResolver
|
||||
|
||||
pytestmark = pytest.mark.skipif(
|
||||
not os.environ.get("LYRA_LIVE_TESTS"),
|
||||
reason="live MusicBrainz test; set LYRA_LIVE_TESTS=1 to run",
|
||||
)
|
||||
|
||||
|
||||
def test_live_resolves_continuum():
|
||||
target = MusicBrainzResolver(contact="lyra-tests@localhost").resolve("John Mayer", "Continuum")
|
||||
assert target is not None
|
||||
assert target.track_count and target.track_count >= 10 # Continuum has 12 tracks
|
||||
assert "continuum" in target.album.casefold()
|
||||
assert target.year == 2006
|
||||
Reference in New Issue
Block a user