mirror of
https://github.com/home-assistant/core.git
synced 2026-11-19 20:21:56 -04:00
@@ -236,6 +236,25 @@ async def test_ssdp_already_configured(hass: HomeAssistant) -> None:
|
||||
assert result["reason"] == "already_configured"
|
||||
|
||||
|
||||
async def test_ssdp_no_serial(hass: HomeAssistant) -> None:
|
||||
"""Test ssdp abort when the ssdp info does not include a serial number."""
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": SOURCE_SSDP},
|
||||
data=ssdp.SsdpServiceInfo(
|
||||
ssdp_usn="mock_usn",
|
||||
ssdp_st="mock_st",
|
||||
ssdp_location=SSDP_URL,
|
||||
upnp={
|
||||
ssdp.ATTR_UPNP_MODEL_NUMBER: "RBR20",
|
||||
ssdp.ATTR_UPNP_PRESENTATION_URL: URL,
|
||||
},
|
||||
),
|
||||
)
|
||||
assert result["type"] == data_entry_flow.FlowResultType.ABORT
|
||||
assert result["reason"] == "no_serial"
|
||||
|
||||
|
||||
async def test_ssdp_ipv6(hass: HomeAssistant) -> None:
|
||||
"""Test ssdp abort when using a ipv6 address."""
|
||||
MockConfigEntry(
|
||||
|
||||
Reference in New Issue
Block a user