24 lines
637 B
Python
24 lines
637 B
Python
|
|
"""Tests for STT adapters."""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
import asyncio
|
||
|
|
|
||
|
|
from fusionagi.adapters.stt_adapter import StubSTTAdapter
|
||
|
|
|
||
|
|
|
||
|
|
class TestStubSTTAdapter:
|
||
|
|
def test_transcribe(self) -> None:
|
||
|
|
adapter = StubSTTAdapter()
|
||
|
|
result = asyncio.get_event_loop().run_until_complete(
|
||
|
|
adapter.transcribe(b"fake audio data")
|
||
|
|
)
|
||
|
|
assert result == "[stub transcription]"
|
||
|
|
|
||
|
|
def test_transcribe_empty(self) -> None:
|
||
|
|
adapter = StubSTTAdapter()
|
||
|
|
result = asyncio.get_event_loop().run_until_complete(
|
||
|
|
adapter.transcribe(b"")
|
||
|
|
)
|
||
|
|
assert result is not None
|