Use switch entities instead of toggle entities in tests (#114585)

This commit is contained in:
Jan-Philipp Benecke 2024-04-02 08:25:28 +02:00 committed by GitHub
parent ab2c88353b
commit c2ffed9b2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 43 additions and 24 deletions

View file

@ -9,9 +9,9 @@ from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
from . import common
from .common import MockSwitch
from tests.common import (
MockToggleEntity,
MockUser,
help_test_all,
import_and_test_deprecated_constant_enum,
@ -20,10 +20,10 @@ from tests.common import (
@pytest.fixture(autouse=True)
def entities(hass: HomeAssistant, mock_toggle_entities: list[MockToggleEntity]):
def entities(hass: HomeAssistant, mock_switch_entities: list[MockSwitch]):
"""Initialize the test switch."""
setup_test_component_platform(hass, switch.DOMAIN, mock_toggle_entities)
return mock_toggle_entities
setup_test_component_platform(hass, switch.DOMAIN, mock_switch_entities)
return mock_switch_entities
async def test_methods(