async def test_delete_sync_with_data(self, mock_db, mock_user, mock_sync):
        """Test deleting a sync with its data."""
        # Arrange
        sync_id = mock_sync.id
        with patch.object(sync_service, "delete_sync", new_callable=AsyncMock) as mock_delete_sync:
            mock_delete_sync.return_value = mock_sync

            # Act
            result = await sync.delete_sync(
                db=mock_db, sync_id=sync_id, delete_data=True, user=mock_user
            )

            # Assert
            mock_delete_sync.assert_called_once_with(
                db=mock_db, sync_id=sync_id, current_user=mock_user, delete_data=True
            )
            assert result == mock_sync
Test deleting a sync with its data.
backend/tests/unit/api/test_sync.py