Merge branch 'dev' into refactor/agent-naming

This commit is contained in:
Björn Otgaar
2025-11-18 19:32:15 +01:00
9 changed files with 407 additions and 185 deletions

View File

@@ -27,9 +27,7 @@ async def test_setup_bind(zmq_context, mocker):
await agent.setup()
# Ensure PUB socket bound
fake_socket.bind.assert_any_call("tcp://localhost:5555")
# Ensure SUB socket connected to internal address and subscribed
fake_socket.connect.assert_any_call("tcp://internal:1234")
fake_socket.setsockopt.assert_any_call(zmq.SUBSCRIBE, b"command")
@@ -48,7 +46,6 @@ async def test_setup_connect(zmq_context, mocker):
await agent.setup()
# Ensure PUB socket connected
fake_socket.connect.assert_any_call("tcp://localhost:5555")
@@ -82,7 +79,7 @@ async def test_send_commands_behaviour_valid_message():
@pytest.mark.asyncio
async def test_send_commands_behaviour_invalid_message(caplog):
async def test_send_commands_behaviour_invalid_message():
"""Test behaviour with invalid JSON message triggers error logging"""
fake_socket = AsyncMock()
fake_socket.recv_multipart = AsyncMock(return_value=(b"command", b"{invalid_json}"))