test(web): isolate SYSTEM_ANNOUNCEMENT/SYSTEM_MAINTENANCE from local .env

The web_app fixture already neutralizes NETWORK_ANNOUNCEMENT so a developer's
local .env does not leak into tests. Do the same for the two new system
settings, fixing test_system_banner_absent_when_none when SYSTEM_ANNOUNCEMENT
is set in the environment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Louis King
2026-06-14 17:55:17 +01:00
parent 22a5ed26d5
commit 2563ad4cf2
+2
View File
@@ -322,6 +322,8 @@ def web_app(mock_http_client: MockHttpClient, monkeypatch: pytest.MonkeyPatch) -
monkeypatch.setenv("WEB_DATETIME_LOCALE", "en-US")
monkeypatch.setenv("OIDC_ENABLED", "false")
monkeypatch.setenv("NETWORK_ANNOUNCEMENT", "")
monkeypatch.setenv("SYSTEM_ANNOUNCEMENT", "")
monkeypatch.setenv("SYSTEM_MAINTENANCE", "false")
app = create_app(
api_url="http://localhost:8000",
api_key="test-api-key",