chore: move magic numbers to env and cleanup

This commit is contained in:
2026-01-26 19:28:16 +01:00
parent d8dc558d3e
commit 650050fa0f
7 changed files with 20 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ async def test_create_agentspeak_and_send_to_bdi(mock_settings):
await manager._create_agentspeak_and_send_to_bdi(program)
# Check file writing
mock_file.assert_called_with("src/control_backend/agents/bdi/agentspeak.asl", "w")
mock_file.assert_called_with(mock_settings.behaviour_settings.agentspeak_file, "w")
handle = mock_file()
handle.write.assert_called()
@@ -67,7 +67,7 @@ async def test_create_agentspeak_and_send_to_bdi(mock_settings):
msg: InternalMessage = manager.send.await_args[0][0]
assert msg.thread == "new_program"
assert msg.to == mock_settings.agent_settings.bdi_core_name
assert msg.body == "src/control_backend/agents/bdi/agentspeak.asl"
assert msg.body == mock_settings.behaviour_settings.agentspeak_file
@pytest.mark.asyncio

View File

@@ -32,6 +32,7 @@ def mock_settings():
mock.agent_settings.vad_name = "vad_agent"
mock.behaviour_settings.sleep_s = 0.01 # Speed up tests
mock.behaviour_settings.comm_setup_max_retries = 1
mock.behaviour_settings.agentspeak_file = "src/control_backend/agents/bdi/agentspeak.asl"
yield mock