Files
social-app/backend/tests/unit/schemas/agent/test_system_agent.py
T

25 lines
665 B
Python
Raw Normal View History

from __future__ import annotations
import pytest
from schemas.agent.system_agent import SystemAgentLLMConfig
def test_system_agent_llm_config_normalizes_enabled_skills() -> None:
config = SystemAgentLLMConfig.model_validate(
{
"enabled_skills": ["calendar", "calendar", "contacts"]
}
)
assert [skill.value for skill in config.enabled_skills] == ["calendar", "contacts"]
def test_system_agent_llm_config_rejects_unknown_enabled_skill() -> None:
with pytest.raises(ValueError):
SystemAgentLLMConfig.model_validate(
{
"enabled_skills": ["calendar.remove"],
}
)