unify production app configuration and ML routes
This commit is contained in:
16
tests/test_config.py
Normal file
16
tests/test_config.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from app.config import load_settings
|
||||
|
||||
|
||||
def test_load_settings_reads_documented_environment(monkeypatch) -> None:
|
||||
monkeypatch.setenv("SILLYHOME_HA_URL", "http://ha.local:8123")
|
||||
monkeypatch.setenv("SILLYHOME_HA_TOKEN", "secret")
|
||||
monkeypatch.setenv("SILLYHOME_MODEL_STORE", "/tmp/models")
|
||||
|
||||
settings = load_settings()
|
||||
|
||||
assert settings.ha_url == "http://ha.local:8123"
|
||||
assert settings.ha_token == "secret"
|
||||
assert settings.model_store == "/tmp/models"
|
||||
assert settings.ha_configured
|
||||
Reference in New Issue
Block a user