File tree Expand file tree Collapse file tree
src/tests/backend/v4/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -502,6 +502,24 @@ async def test_close_connection_with_exception(self):
502502 mock_logger .error .assert_called ()
503503 # Connection should still be removed
504504 self .assertNotIn (process_id , config .connections )
505+
506+ async def test_send_status_update_async_success (self ):
507+ """Test sending a plain string status update successfully."""
508+
509+ config = ConnectionConfig ()
510+ user_id = "user-123"
511+ process_id = "process-456"
512+ message = "Test message"
513+ connection = AsyncMock ()
514+
515+ config .add_connection (process_id , connection , user_id )
516+
517+ await config .send_status_update_async (message , user_id )
518+
519+ connection .send_text .assert_called_once ()
520+ sent_data = json .loads (connection .send_text .call_args [0 ][0 ])
521+ self .assertIn ('type' , sent_data )
522+ self .assertEqual (sent_data ['data' ], message )
505523
506524 async def test_send_status_update_async_no_user_id (self ):
507525 """Test sending status update with no user ID."""
You can’t perform that action at this time.
0 commit comments