async def test_run_sync_not_found(self, mock_db, mock_user, mock_background_tasks):
        """Test running a sync that doesn't exist."""
        # Arrange
        sync_id = uuid.uuid4()
        with patch.object(
            sync_service, "trigger_sync_run", new_callable=AsyncMock
        ) as mock_trigger_run:
            mock_trigger_run.side_effect = HTTPException(status_code=404, detail="Sync not found")

            # Act & Assert
            with pytest.raises(HTTPException) as exc_info:
                await sync.run_sync(
                    db=mock_db,
                    sync_id=sync_id,
                    user=mock_user,
                    background_tasks=mock_background_tasks,
                )

            assert exc_info.value.status_code == 404
            assert exc_info.value.detail == "Sync not found"
Test running a sync that doesn't exist.
backend/tests/unit/api/test_sync.py