Skip to content

Commit 32fa238

Browse files
fixed unit test case
1 parent b4d509c commit 32fa238

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tests/api/services/test_chat_service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def test_popitem_with_agent(self, mock_thread_class, mock_create_task, mock_agen
143143
cache = ExpCache(maxsize=2, ttl=60, agent=mock_agent)
144144
cache['key1'] = 'thread_id_1'
145145
cache['key2'] = 'thread_id_2'
146-
cache['key3'] = 'thread_id_3' # This should trigger LRU eviction
146+
cache['key3'] = 'thread_id_3'
147147

148148
# Verify thread deletion was scheduled
149149
mock_create_task.assert_called()
@@ -208,7 +208,7 @@ async def test_process_rag_response_success(self, mock_get_agent):
208208
"""
209209

210210
mock_msg = MagicMock()
211-
mock_msg.role = MessageRole.AGENT # ✅ Correct Enum type
211+
mock_msg.role = MessageRole.AGENT
212212
mock_msg.text_messages = [mock_text_msg]
213213

214214
# Setup all methods
@@ -221,7 +221,7 @@ async def test_process_rag_response_success(self, mock_get_agent):
221221
# ACT
222222
result = await service.process_rag_response("RAG content", "Query")
223223

224-
print("RESULT:", result) # 🔍 debug
224+
print("RESULT:", result)
225225

226226
# ASSERT
227227
assert isinstance(result, dict)

0 commit comments

Comments
 (0)