feat: establish voice assistant V1 baseline
This commit is contained in:
40
tests/test_agent.py
Normal file
40
tests/test_agent.py
Normal file
@@ -0,0 +1,40 @@
|
||||
import pytest
|
||||
|
||||
from voice_assistant.agent import MockAgentAdapter
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def text_mock_agent_process_text():
|
||||
agent = MackAgentAdapter()
|
||||
|
||||
response = await agent.process(
|
||||
session_id="session-1",
|
||||
turn_id=1,
|
||||
text="Qual o horário de funcionamento?",
|
||||
)
|
||||
|
||||
assert response == (
|
||||
"Resposta simulada para: "
|
||||
"Qual o horário de funcionamento?"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_mock_agent_records_call():
|
||||
agent = MockAgentAdapter()
|
||||
|
||||
await agent.process(
|
||||
session_id="session-1",
|
||||
turn_id=7,
|
||||
text= "Olá",
|
||||
)
|
||||
|
||||
|
||||
assert agent.calls == [
|
||||
(
|
||||
"session-1",
|
||||
7,
|
||||
"Olá",
|
||||
)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user