Files
reflector/server/tests/test_webvtt_implementation.py
Igor Loskutov 6fb5cb21c2 feat: search backend (#537)
* docs: transient docs

* chore: cleanup

* webvtt WIP

* webvtt field

* chore: webvtt tests comments

* chore: remove useless tests

* feat: search TASK.md

* feat: full text search by title/webvtt

* chore: search api task

* feat: search api

* feat: search API

* chore: rm task md

* chore: roll back unnecessary validators

* chore: pr review WIP

* chore: pr review WIP

* chore: pr review

* chore: top imports

* feat: better lint + ci

* feat: better lint + ci

* feat: better lint + ci

* feat: better lint + ci

* chore: lint

* chore: lint

* fix: db datetime definitions

* fix: flush() params

* fix: update transcript mutability expectation / test

* fix: update transcript mutability expectation / test

* chore: auto review

* chore: new controller extraction

* chore: new controller extraction

* chore: cleanup

* chore: review WIP

* chore: pr WIP

* chore: remove ci lint

* chore: openapi regeneration

* chore: openapi regeneration

* chore: postgres test doc

* fix: .dockerignore for arm binaries

* fix: .dockerignore for arm binaries

* fix: cap test loops

* fix: cap test loops

* fix: cap test loops

* fix: get_transcript_topics

* chore: remove flow.md docs and claude guidance

* chore: remove claude.md db doc

* chore: remove claude.md db doc

* chore: remove claude.md db doc

* chore: remove claude.md db doc
2025-08-13 10:03:38 -04:00

35 lines
1016 B
Python

"""Test WebVTT auto-update functionality and edge cases."""
import pytest
from reflector.db.transcripts import (
TranscriptController,
)
@pytest.mark.asyncio
class TestWebVTTAutoUpdateImplementation:
async def test_handle_topics_update_handles_dict_conversion(self):
"""
Verify that _handle_topics_update() properly converts dict data to TranscriptTopic objects.
"""
values = {
"topics": [
{
"id": "topic1",
"title": "Test",
"summary": "Test",
"timestamp": 0.0,
"words": [
{"text": "Hello", "start": 0.0, "end": 1.0, "speaker": 0}
],
}
]
}
updated_values = TranscriptController._handle_topics_update(values)
assert "webvtt" in updated_values
assert updated_values["webvtt"] is not None
assert "WEBVTT" in updated_values["webvtt"]