Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions tests/unit/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def test_init_from_dict() -> None:
assert cfg.configuration.name == "foo"

# check for llama_stack_configuration subsection
assert cfg.llama_stack_configuration.api_key is not None
assert cfg.llama_stack_configuration.api_key.get_secret_value() == "xyzzy"
assert cfg.llama_stack_configuration.url == "http://x.y.com:1234"
assert cfg.llama_stack_configuration.use_as_library_client is False
Expand Down Expand Up @@ -254,7 +255,7 @@ def test_load_proper_configuration(tmpdir: Path) -> None:
)

cfg = AppConfig()
cfg.load_configuration(cfg_filename)
cfg.load_configuration(str(cfg_filename))
assert cfg.configuration is not None
assert cfg.llama_stack_configuration is not None
assert cfg.service_configuration is not None
Expand Down Expand Up @@ -291,7 +292,7 @@ def test_load_configuration_with_mcp_servers(tmpdir: Path) -> None:
)

cfg = AppConfig()
cfg.load_configuration(cfg_filename)
cfg.load_configuration(str(cfg_filename))

assert len(cfg.mcp_servers) == 2
assert cfg.mcp_servers[0].name == "filesystem-server"
Expand Down Expand Up @@ -458,7 +459,7 @@ def test_load_configuration_with_customization_system_prompt_path(tmpdir: Path)
)

cfg = AppConfig()
cfg.load_configuration(cfg_filename)
cfg.load_configuration(str(cfg_filename))

assert cfg.customization is not None
assert cfg.customization.system_prompt is not None
Expand Down Expand Up @@ -498,7 +499,7 @@ def test_load_configuration_with_customization_system_prompt(tmpdir: Path) -> No
)

cfg = AppConfig()
cfg.load_configuration(cfg_filename)
cfg.load_configuration(str(cfg_filename))

assert cfg.customization is not None
assert cfg.customization.system_prompt is not None
Expand Down Expand Up @@ -536,7 +537,7 @@ def test_configuration_with_profile_customization(tmpdir: Path) -> None:
)

cfg = AppConfig()
cfg.load_configuration(cfg_filename)
cfg.load_configuration(str(cfg_filename))

assert (
cfg.customization is not None and cfg.customization.custom_profile is not None
Expand Down Expand Up @@ -581,7 +582,7 @@ def test_configuration_with_all_customizations(tmpdir: Path) -> None:
)

cfg = AppConfig()
cfg.load_configuration(cfg_filename)
cfg.load_configuration(str(cfg_filename))

assert (
cfg.customization is not None and cfg.customization.custom_profile is not None
Expand Down
Loading