- Removed legacy agent profile settings from the .env.example and README, streamlining the configuration process. - Introduced a new local YAML configuration adapter for assistant settings, allowing for easier management of assistant profiles. - Updated backend integration documentation to clarify the behavior of assistant config sourcing based on backend URL settings. - Adjusted various service implementations to directly utilize API keys from the new configuration structure. - Enhanced test coverage for the new local YAML adapter and its integration with backend services.
22 lines
602 B
Python
22 lines
602 B
Python
import importlib
|
|
|
|
|
|
def test_settings_load_from_environment(monkeypatch):
|
|
monkeypatch.setenv("HOST", "127.0.0.1")
|
|
monkeypatch.setenv("PORT", "8123")
|
|
|
|
import app.config as config_module
|
|
importlib.reload(config_module)
|
|
|
|
settings = config_module.get_settings()
|
|
assert settings.host == "127.0.0.1"
|
|
assert settings.port == 8123
|
|
|
|
|
|
def test_assistant_local_config_dir_default_present():
|
|
import app.config as config_module
|
|
|
|
settings = config_module.get_settings()
|
|
assert isinstance(settings.assistant_local_config_dir, str)
|
|
assert settings.assistant_local_config_dir
|