fix/various fixes
This commit is contained in:
@@ -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=[]),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user