test: make tests work again after changing Program schema

ref: N25B-380
This commit is contained in:
Twirre Meulenbelt
2025-12-29 12:31:51 +01:00
parent 7e0dc9ce1c
commit 57b1276cb5
6 changed files with 110 additions and 81 deletions

View File

@@ -45,10 +45,10 @@ async def test_handle_message_from_transcriber(agent, mock_settings):
@pytest.mark.asyncio
async def test_process_transcription_demo(agent, mock_settings):
async def test_process_user_said(agent, mock_settings):
transcription = "this is a test"
await agent._process_transcription_demo(transcription)
await agent._user_said(transcription)
agent.send.assert_awaited_once() # noqa # `agent.send` has no such property, but we mock it.
sent: InternalMessage = agent.send.call_args.args[0] # noqa
@@ -56,10 +56,3 @@ async def test_process_transcription_demo(agent, mock_settings):
assert sent.thread == "beliefs"
parsed = json.loads(sent.body)
assert parsed["beliefs"]["user_said"] == [transcription]
@pytest.mark.asyncio
async def test_setup_initializes_beliefs(agent):
"""Covers the setup method and ensures beliefs are initialized."""
await agent.setup()
assert agent.beliefs == {"mood": ["X"], "car": ["Y"]}