1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 22:18:40 +00:00

Integrations h* - i*: Rename HomeAssistantType to HomeAssistant. (#49587)

This commit is contained in:
jan iversen
2021-04-23 10:11:58 +02:00
committed by GitHub
parent a396619251
commit 9685cefba4
26 changed files with 143 additions and 156 deletions

View File

@@ -20,8 +20,8 @@ from homeassistant.components.hyperion.const import (
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
from homeassistant.config_entries import RELOAD_AFTER_UPDATE_DELAY
from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr, entity_registry as er
from homeassistant.helpers.typing import HomeAssistantType
from homeassistant.util import dt, slugify
from . import (
@@ -52,7 +52,7 @@ TEST_SWITCH_COMPONENT_BASE_ENTITY_ID = "switch.test_instance_1_component"
TEST_SWITCH_COMPONENT_ALL_ENTITY_ID = f"{TEST_SWITCH_COMPONENT_BASE_ENTITY_ID}_all"
async def test_switch_turn_on_off(hass: HomeAssistantType) -> None:
async def test_switch_turn_on_off(hass: HomeAssistant) -> None:
"""Test turning the light on."""
client = create_mock_client()
client.async_send_set_component = AsyncMock(return_value=True)
@@ -121,7 +121,7 @@ async def test_switch_turn_on_off(hass: HomeAssistantType) -> None:
assert entity_state.state == "on"
async def test_switch_has_correct_entities(hass: HomeAssistantType) -> None:
async def test_switch_has_correct_entities(hass: HomeAssistant) -> None:
"""Test that the correct switch entities are created."""
client = create_mock_client()
client.components = TEST_COMPONENTS
@@ -144,7 +144,7 @@ async def test_switch_has_correct_entities(hass: HomeAssistantType) -> None:
assert entity_state, f"Couldn't find entity: {entity_id}"
async def test_device_info(hass: HomeAssistantType) -> None:
async def test_device_info(hass: HomeAssistant) -> None:
"""Verify device information includes expected details."""
client = create_mock_client()
client.components = TEST_COMPONENTS
@@ -184,7 +184,7 @@ async def test_device_info(hass: HomeAssistantType) -> None:
assert entity_id in entities_from_device
async def test_switches_can_be_enabled(hass: HomeAssistantType) -> None:
async def test_switches_can_be_enabled(hass: HomeAssistant) -> None:
"""Verify switches can be enabled."""
client = create_mock_client()
client.components = TEST_COMPONENTS