feat: visual emotion recognition agent

This commit is contained in:
Luijkx,S.O.H. (Storm)
2026-01-30 16:53:15 +00:00
committed by Kasper Marinus
parent 68f445c8bc
commit 45b8597f15
12 changed files with 1533 additions and 112 deletions

View File

@@ -305,26 +305,30 @@ async def test_send_experiment_control(agent):
@pytest.mark.asyncio
async def test_send_pause_command(agent):
# --- Test PAUSE ---
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
# Should send exactly 1 message
assert agent.send.await_count == 1
# Extract the message object from the mock call
# call_args[0] are positional args, and [0] is the first arg (the message)
msg = agent.send.call_args[0][0]
vad_msg = next(m for m in msgs if m.to == settings.agent_settings.vad_name)
assert vad_msg.body == "PAUSE"
# Verify Body
assert msg.body == "PAUSE"
# --- Test RESUME ---
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"
# Should send exactly 1 message
assert agent.send.await_count == 1
msg = agent.send.call_args[0][0]
# Verify Body
assert msg.body == "RESUME"
@pytest.mark.asyncio
async def test_setup(agent):