Tests don't inherit optional features from the local environment
CI / validate-monitoring (push) Successful in 7s
CI / lint (push) Successful in 13s
CI / test (push) Successful in 1m2s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 5s

TestConfig pins FEDERATION_ENABLED off and LASTFM_API_KEY empty, so a
developer's .env (e.g. federation switched on to try it locally) can't
change what the "feature off" tests see. Tests that need a feature turn
it on explicitly (FederatedTestConfig, lastfm_config).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
mattandClaude Opus 5.5 committed 2026-09-25 20:34:23 +01:00
1 parent 8d12922f6a
commit f21ce173b8
1 file changed
+4
+4
View File
@@ -76,3 +76,7 @@ class TestConfig(Config):
"postgresql+psycopg://scrobbler:scrobbler@localhost:5432/scrobbler_test",
)
START_METRICS_SERVER = False
# Tests never inherit optional features from a developer's .env or environment;
# tests that need them turn them on explicitly.
LASTFM_API_KEY = ""
FEDERATION_ENABLED = "0"