fix: tests pass

ref: N25B-241
ref: N25B-242
This commit is contained in:
2025-11-05 16:08:28 +01:00
parent d9fef22090
commit 9e7119481c
7 changed files with 43 additions and 182 deletions

View File

@@ -17,12 +17,21 @@ def audio_out_socket():
@pytest.fixture
def streaming(audio_in_socket, audio_out_socket):
def mock_agent(mocker):
"""Fixture to create a mock BDIAgent."""
agent = MagicMock()
agent.jid = "vad_agent@test"
return agent
@pytest.fixture
def streaming(audio_in_socket, audio_out_socket, mock_agent):
import torch
torch.hub.load.return_value = (..., ...) # Mock
streaming = Streaming(audio_in_socket, audio_out_socket)
streaming._ready = True
streaming.agent = mock_agent
return streaming