test: update test suite for OmegaConf config system

- Add tests/conftest.py with make_settings() helper that maps legacy config
  parameter names to new nested OmegaConf structure
- Update all test files to use the conftest fixture
- All 73 tests now pass with new config system
- Maintains backward compatibility via Settings class properties

Also add AGENTS.md with comprehensive AI agent guidelines:
- Project overview and key technologies
- Directory structure reference
- Development workflow and common tasks
- Testing strategy and patterns
- CI/CD pipeline overview
- Common pitfalls and best practices
- Debugging guide for agents working on the project
This commit is contained in:
Daniel Wagner
2026-07-26 12:48:40 +10:00
parent d0ccc96507
commit 070e967833
10 changed files with 745 additions and 53 deletions
+4 -4
View File
@@ -19,6 +19,7 @@ from steward.tools.client import (
_schema_to_json_schema,
_spec_to_openai_tools,
)
from tests.conftest import make_settings
# ---------------------------------------------------------------------------
# Fixtures
@@ -86,6 +87,7 @@ SIMPLE_SPEC: dict[str, Any] = {
def _make_llm_settings(**kwargs: Any) -> Settings:
"""Wrapper for test compatibility."""
defaults = dict(
telegram_bot_token="t",
openai_api_key="k",
@@ -93,7 +95,7 @@ def _make_llm_settings(**kwargs: Any) -> Settings:
openai_system_prompt="You are Steward.",
)
defaults.update(kwargs)
return Settings(**defaults)
return make_settings(**defaults)
# ---------------------------------------------------------------------------
@@ -281,9 +283,7 @@ async def test_tool_client_call_get_with_query():
respx.get("http://tools.local/openapi.json").mock(
return_value=Response(200, json=SIMPLE_SPEC)
)
respx.get("http://tools.local/items").mock(
return_value=Response(200, json=[{"id": 1}])
)
respx.get("http://tools.local/items").mock(return_value=Response(200, json=[{"id": 1}]))
client = ToolClient("http://tools.local")
result = await client.call("list_items", {"limit": 10})
assert "id" in result