feat: Admin-Seite mit Passwortaenderung und Regel-Neuanwendung

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 08:24:33 +02:00
parent 74684c7e6c
commit f5fa3e45e8
13 changed files with 690 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
from pathlib import Path
from app.config import get_settings
@@ -5,3 +7,31 @@ def test_defaults():
s = get_settings()
assert s.horizon_days == 548
assert s.gui_user == "admin"
def test_env_file_defaults_to_container_mount_path(monkeypatch):
monkeypatch.delenv("FB_ENV_FILE", raising=False)
get_settings.cache_clear()
try:
assert get_settings().env_file == Path("/data/.env")
finally:
get_settings.cache_clear()
def test_env_file_overridable_via_env_var(monkeypatch, tmp_path):
custom = tmp_path / "custom.env"
monkeypatch.setenv("FB_ENV_FILE", str(custom))
get_settings.cache_clear()
try:
assert get_settings().env_file == custom
finally:
get_settings.cache_clear()
def test_grafana_url_default(monkeypatch):
monkeypatch.delenv("FB_GRAFANA_URL", raising=False)
get_settings.cache_clear()
try:
assert get_settings().grafana_url == "http://localhost:3000"
finally:
get_settings.cache_clear()