fix: improve maintenance and synchronize live conversations
This commit is contained in:
1 parent
bb541bd212
commit
ef86a5d3af
297 files changed
+2983
-1274
No files matched your search
@@ -65,15 +65,14 @@ def chat_agent(mock_agent_data, mock_db):
|
||||
mock_storage = Mock()
|
||||
mock_storage.get_session_state.return_value = {"status": "active"}
|
||||
|
||||
with patch('app.agents.chat_agent.get_db') as mock_get_db, \
|
||||
with patch('app.agents.chat_agent.SessionLocal') as mock_session_local, \
|
||||
patch('app.agents.chat_agent.JiraRepository') as mock_jira_repo, \
|
||||
patch('app.tools.knowledge_search_byagent.KnowledgeSearchByAgent', return_value=mock_knowledge_tool), \
|
||||
patch('app.agents.chat_agent.EncryptedPostgresAgentStorage', return_value=mock_storage), \
|
||||
patch('app.agents.chat_agent.settings.DATABASE_URL', "mock://test"), \
|
||||
patch.dict('os.environ', mock_env, clear=True):
|
||||
|
||||
# Mock database session
|
||||
mock_get_db.return_value = iter([mock_db])
|
||||
mock_session_local.return_value.__enter__.return_value = mock_db
|
||||
|
||||
# Mock JiraRepository methods
|
||||
mock_jira_repo.return_value.get_agent_with_jira_config.return_value = mock_jira_agent_data
|
||||
@@ -241,4 +240,4 @@ class TestChatAgentEndChat:
|
||||
|
||||
# Verify agent's default setting was used
|
||||
assert result.request_rating is True
|
||||
assert "Would you please take a moment to rate your experience?" in result.message
|
||||
assert "Would you please take a moment to rate your experience?" in result.message
|
||||
Reference in new issue
Block a user