Remove YAML config for directv (#41961)
This commit is contained in:
@@ -3,7 +3,7 @@ from aiohttp import ClientError as HTTPClientError
|
||||
|
||||
from homeassistant.components.directv.const import CONF_RECEIVER_ID, DOMAIN
|
||||
from homeassistant.components.ssdp import ATTR_UPNP_SERIAL
|
||||
from homeassistant.config_entries import SOURCE_IMPORT, SOURCE_SSDP, SOURCE_USER
|
||||
from homeassistant.config_entries import SOURCE_SSDP, SOURCE_USER
|
||||
from homeassistant.const import CONF_HOST, CONF_NAME, CONF_SOURCE
|
||||
from homeassistant.data_entry_flow import (
|
||||
RESULT_TYPE_ABORT,
|
||||
@@ -213,30 +213,6 @@ async def test_ssdp_confirm_unknown_error(
|
||||
assert result["reason"] == "unknown"
|
||||
|
||||
|
||||
async def test_full_import_flow_implementation(
|
||||
hass: HomeAssistantType, aioclient_mock: AiohttpClientMocker
|
||||
) -> None:
|
||||
"""Test the full manual user flow from start to finish."""
|
||||
mock_connection(aioclient_mock)
|
||||
|
||||
user_input = MOCK_USER_INPUT.copy()
|
||||
with patch(
|
||||
"homeassistant.components.directv.async_setup_entry", return_value=True
|
||||
), patch("homeassistant.components.directv.async_setup", return_value=True):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={CONF_SOURCE: SOURCE_IMPORT},
|
||||
data=user_input,
|
||||
)
|
||||
|
||||
assert result["type"] == RESULT_TYPE_CREATE_ENTRY
|
||||
assert result["title"] == HOST
|
||||
|
||||
assert result["data"]
|
||||
assert result["data"][CONF_HOST] == HOST
|
||||
assert result["data"][CONF_RECEIVER_ID] == RECEIVER_ID
|
||||
|
||||
|
||||
async def test_full_user_flow_implementation(
|
||||
hass: HomeAssistantType, aioclient_mock: AiohttpClientMocker
|
||||
) -> None:
|
||||
|
||||
@@ -6,22 +6,13 @@ from homeassistant.config_entries import (
|
||||
ENTRY_STATE_SETUP_RETRY,
|
||||
)
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.components.directv import MOCK_CONFIG, mock_connection, setup_integration
|
||||
from tests.components.directv import setup_integration
|
||||
from tests.test_util.aiohttp import AiohttpClientMocker
|
||||
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
|
||||
async def test_setup(
|
||||
hass: HomeAssistantType, aioclient_mock: AiohttpClientMocker
|
||||
) -> None:
|
||||
"""Test the DirecTV setup from configuration."""
|
||||
mock_connection(aioclient_mock)
|
||||
assert await async_setup_component(hass, DOMAIN, MOCK_CONFIG)
|
||||
|
||||
|
||||
async def test_config_entry_not_ready(
|
||||
hass: HomeAssistantType, aioclient_mock: AiohttpClientMocker
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user