refactor: lazy load credentials for testing

This commit is contained in:
2026-04-06 07:20:23 +02:00
parent a8335d9920
commit 9b04160783
8 changed files with 110 additions and 19 deletions
+10
View File
@@ -1,3 +1,13 @@
import pytest
from lrx_cli.config import enable_debug
enable_debug()
@pytest.fixture
def no_credentials(monkeypatch):
"""Clear all credential env vars so only anonymous fetchers are active."""
monkeypatch.delenv("SPOTIFY_SP_DC", raising=False)
monkeypatch.delenv("QQ_MUSIC_API_URL", raising=False)
monkeypatch.delenv("MUSIXMATCH_USERTOKEN", raising=False)