fix: tests pass
ref: N25B-241 ref: N25B-242
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user