feat: integrate OCI agent streaming and web voice client
This commit is contained in:
32
tests/test_web_client.py
Normal file
32
tests/test_web_client.py
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from voice_assistant.audio_gateway.app.main import app
|
||||
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
def test_web_client_page():
|
||||
response = client.get("/ui")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "AgentVoice" in response.text
|
||||
assert "/web/app.js" in response.text
|
||||
|
||||
|
||||
def test_web_client_javascript():
|
||||
response = client.get("/web/app.js")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "audio.start" in response.text
|
||||
assert "audio.stop" in response.text
|
||||
assert "agent.delta" in response.text
|
||||
|
||||
|
||||
def test_web_client_audio_worklet():
|
||||
response = client.get("/web/pcm-worklet.js")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "registerProcessor" in response.text
|
||||
assert "pcm-input" in response.text
|
||||
Reference in New Issue
Block a user