19 lines
526 B
Python
19 lines
526 B
Python
import os
|
|
|
|
import pytest
|
|
|
|
pytestmark = pytest.mark.skipif(
|
|
not os.environ.get("LYRA_LIVE_TESTS"),
|
|
reason="hits the real MusicBrainz API; set LYRA_LIVE_TESTS=1 to run",
|
|
)
|
|
|
|
|
|
def test_search_and_browse_real_artist():
|
|
from lyra_worker._mbbrowser import MusicBrainzBrowser
|
|
|
|
browser = MusicBrainzBrowser()
|
|
hits = browser.search_artist("John Mayer")
|
|
assert hits and any("John Mayer" in h.name for h in hits)
|
|
releases = browser.browse_release_groups(hits[0].mbid)
|
|
assert any(r.title for r in releases)
|