fix/various fixes

This commit is contained in:
Kevin
2026-03-20 15:15:35 +08:00
parent 7f57f96c25
commit 7317bf10cd
112 changed files with 3790 additions and 2242 deletions

View File

@@ -7,6 +7,7 @@ from unittest.mock import AsyncMock, patch
from starlette.websockets import WebSocketDisconnect, WebSocketState
from app.features.conversation import service as conversation_feature_service
from app.features.conversation.models import Conversation, Segment
from app.features.conversation.ws import router as ws_router
@@ -185,7 +186,7 @@ def _session_local_factory(fake_db):
def _redis_empty_history_patch():
"""Patch redis to return empty history so websocket sends opening (or skips if mocked)."""
return patch.object(
ws_router.redis_service,
conversation_feature_service.redis_service,
"get_conversation_history",
new=AsyncMock(return_value=[]),
)