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

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
akou
2026-06-26 03:14:06 +00:00
committed by GitHub
co-authored by Claude Opus 4.8
parent f4e832f35c
commit 677ab01806
@@ -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]