From 677ab018066bb8193cb994adfb20e8d46fa6b8de Mon Sep 17 00:00:00 2001 From: akou Date: Fri, 26 Jun 2026 11:14:06 +0800 Subject: [PATCH] refactor(tests): use caplog in workflow collaboration service tests (#37468) (#37991) Co-authored-by: Claude Opus 4.8 --- .../unit_tests/services/test_workflow_collaboration_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]