mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
server: fixes tests
This commit is contained in:
@@ -24,15 +24,12 @@ async def test_basic_process(event_loop):
|
|||||||
LLM.register("test", LLMTest)
|
LLM.register("test", LLMTest)
|
||||||
|
|
||||||
# event callback
|
# event callback
|
||||||
marks = {
|
marks = {}
|
||||||
"transcript": 0,
|
|
||||||
"topic": 0,
|
|
||||||
"summary": 0,
|
|
||||||
}
|
|
||||||
|
|
||||||
async def event_callback(event, data):
|
async def event_callback(event):
|
||||||
print(f"{event}: {data}")
|
if event.processor not in marks:
|
||||||
marks[event] += 1
|
marks[event.processor] = 0
|
||||||
|
marks[event.processor] += 1
|
||||||
|
|
||||||
# invoke the process and capture events
|
# invoke the process and capture events
|
||||||
path = Path(__file__).parent / "records" / "test_mathieu_hello.wav"
|
path = Path(__file__).parent / "records" / "test_mathieu_hello.wav"
|
||||||
@@ -40,6 +37,6 @@ async def test_basic_process(event_loop):
|
|||||||
print(marks)
|
print(marks)
|
||||||
|
|
||||||
# validate the events
|
# validate the events
|
||||||
assert marks["transcript"] == 5
|
assert marks["TranscriptLinerProcessor"] == 5
|
||||||
assert marks["topic"] == 1
|
assert marks["TranscriptTopicDetectorProcessor"] == 1
|
||||||
assert marks["summary"] == 1
|
assert marks["TranscriptFinalSummaryProcessor"] == 1
|
||||||
|
|||||||
Reference in New Issue
Block a user