Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

refactor(tests): use caplog in workflow collaboration service tests (#37468) (#37991)

akou677ab018066b
diff --git a/api/tests/unit_tests/services/test_workflow_collaboration_service.py b/api/tests/unit_tests/services/test_workflow_collaboration_service.py
index 93d9b576f97..a88976e0962 100644
--- a/api/tests/unit_tests/services/test_workflow_collaboration_service.py
+++ b/api/tests/unit_tests/services/test_workflow_collaboration_service.py
@@ -441,7 +441,7 @@ class TestWorkflowCollaborationService:
error_records = [record for record in caplog.records if record.levelno == logging.ERROR]
assert len(error_records) == 1
- assert "Failed to emit leader status to session sid-1" in caplog.text
+ assert "Failed to emit leader status to session sid-1" in error_records[0].getMessage()
def test_broadcast_online_users_sorts_and_emits(
self, service: tuple[WorkflowCollaborationService, Mock, Mock]