chore: remove pipeline stuff

This commit is contained in:
JobvAlewijk
2026-01-30 16:02:40 +01:00
parent f89fb2266a
commit 11d7c1409e
3 changed files with 0 additions and 79 deletions

View File

@@ -4,8 +4,6 @@ from unittest.mock import ANY, AsyncMock, MagicMock, patch
import pytest import pytest
from control_backend.agents.communication.ri_communication_agent import RICommunicationAgent from control_backend.agents.communication.ri_communication_agent import RICommunicationAgent
from control_backend.core.agent_system import InternalMessage
from control_backend.schemas.ri_message import PauseCommand, RIEndpoint
def speech_agent_path(): def speech_agent_path():
@@ -396,38 +394,3 @@ async def test_negotiate_req_socket_none_causes_retry(zmq_context):
result = await agent._negotiate_connection(max_retries=1) result = await agent._negotiate_connection(max_retries=1)
assert result is False assert result is False
@pytest.mark.asyncio
async def test_handle_message_pause_command(zmq_context):
"""Test handle_message with a valid PauseCommand."""
agent = RICommunicationAgent("ri_comm")
agent._req_socket = AsyncMock()
agent.logger = MagicMock()
agent._req_socket.recv_json.return_value = {"status": "ok"}
pause_cmd = PauseCommand(data=True)
msg = InternalMessage(to="ri_comm", sender="user_int", body=pause_cmd.model_dump_json())
await agent.handle_message(msg)
agent._req_socket.send_json.assert_awaited_once()
args = agent._req_socket.send_json.await_args[0][0]
assert args["endpoint"] == RIEndpoint.PAUSE.value
assert args["data"] is True
@pytest.mark.asyncio
async def test_handle_message_invalid_pause_command(zmq_context):
"""Test handle_message with invalid JSON."""
agent = RICommunicationAgent("ri_comm")
agent._req_socket = AsyncMock()
agent.logger = MagicMock()
msg = InternalMessage(to="ri_comm", sender="user_int", body="invalid json")
await agent.handle_message(msg)
agent.logger.warning.assert_called_with("Incorrect message format for PauseCommand.")
agent._req_socket.send_json.assert_not_called()

View File

@@ -8,10 +8,6 @@ from control_backend.agents.perception.face_rec_agent import FacePerceptionAgent
from control_backend.core.agent_system import InternalMessage from control_backend.core.agent_system import InternalMessage
from control_backend.schemas.belief_message import BeliefMessage from control_backend.schemas.belief_message import BeliefMessage
# -------------------------
# Fixtures
# -------------------------
@pytest.fixture @pytest.fixture
def agent(): def agent():
@@ -33,11 +29,6 @@ def socket():
return sock return sock
# -------------------------
# Socket setup tests
# -------------------------
def test_connect_socket_connect(agent, socket, monkeypatch): def test_connect_socket_connect(agent, socket, monkeypatch):
"""Test that _connect_socket properly connects when zmq_bind=False.""" """Test that _connect_socket properly connects when zmq_bind=False."""
ctx = MagicMock() ctx = MagicMock()
@@ -69,11 +60,6 @@ def test_connect_socket_twice_is_noop(agent, socket):
assert agent._socket is socket assert agent._socket is socket
# -------------------------
# Belief update tests
# -------------------------
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_update_face_belief_present(agent): async def test_update_face_belief_present(agent):
"""Test that _update_face_belief(True) creates the 'face_present' belief.""" """Test that _update_face_belief(True) creates the 'face_present' belief."""
@@ -112,11 +98,6 @@ async def test_post_face_belief_absent(agent):
assert '"delete"' in msg.body and '"face_present"' in msg.body assert '"delete"' in msg.body and '"face_present"' in msg.body
# -------------------------
# Message handling tests
# -------------------------
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_handle_pause(agent): async def test_handle_pause(agent):
"""Test that a 'PAUSE' message clears _paused and resets _last_face_state.""" """Test that a 'PAUSE' message clears _paused and resets _last_face_state."""

View File

@@ -297,29 +297,6 @@ async def test_send_experiment_control(agent):
assert msg.thread == "reset_experiment" assert msg.thread == "reset_experiment"
@pytest.mark.asyncio
async def test_send_pause_command(agent):
await agent._send_pause_command("true")
# Sends to RI and VAD
assert agent.send.await_count == 2
msgs = [call.args[0] for call in agent.send.call_args_list]
ri_msg = next(m for m in msgs if m.to == settings.agent_settings.ri_communication_name)
assert json.loads(ri_msg.body)["endpoint"] == "" # PAUSE endpoint
assert json.loads(ri_msg.body)["data"] is True
vad_msg = next(m for m in msgs if m.to == settings.agent_settings.vad_name)
assert vad_msg.body == "PAUSE"
agent.send.reset_mock()
await agent._send_pause_command("false")
assert agent.send.await_count == 2
vad_msg = next(
m for m in agent.send.call_args_list if m.args[0].to == settings.agent_settings.vad_name
).args[0]
assert vad_msg.body == "RESUME"
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_setup(agent): async def test_setup(agent):
"""Test the setup method initializes sockets correctly.""" """Test the setup method initializes sockets correctly."""