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 11:14:06 +08:00 committed by GitHub
parent f4e832f35c
commit 677ab01806
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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]