2024-01-22 17:24:15 +01:00
|
|
|
"""Test the cloud assist pipeline."""
|
2024-03-08 19:16:21 +01:00
|
|
|
|
2024-01-22 17:24:15 +01:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
from homeassistant.components.cloud.assist_pipeline import (
|
|
|
|
async_migrate_cloud_pipeline_engine,
|
|
|
|
)
|
|
|
|
from homeassistant.const import Platform
|
|
|
|
from homeassistant.core import HomeAssistant
|
2024-04-01 21:34:25 -04:00
|
|
|
from homeassistant.setup import async_setup_component
|
2024-01-22 17:24:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
async def test_migrate_pipeline_invalid_platform(hass: HomeAssistant) -> None:
|
|
|
|
"""Test migrate pipeline with invalid platform."""
|
2024-04-01 21:34:25 -04:00
|
|
|
await async_setup_component(hass, "assist_pipeline", {})
|
2024-01-22 17:24:15 +01:00
|
|
|
with pytest.raises(ValueError):
|
|
|
|
await async_migrate_cloud_pipeline_engine(
|
|
|
|
hass, Platform.BINARY_SENSOR, "test-engine-id"
|
|
|
|
)
|