hass-core/tests/components/select/conftest.py
Jan-Philipp Benecke 8d6d70d6b5
Use setup_test_component_platform helper for select entity component tests instead of hass.components (#114412)
* Use `setup_test_component_platform` helper for select entity component tests instead of `hass.components`

* Use _values instead of _attr_current_option

* Clean up

* Set default current_option for second mock entity

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-29 14:36:33 +01:00

24 lines
672 B
Python

"""Fixtures for the select entity component tests."""
import pytest
from tests.components.select.common import MockSelectEntity
@pytest.fixture
def mock_select_entities() -> list[MockSelectEntity]:
"""Return a list of mock select entities."""
return [
MockSelectEntity(
name="select 1",
unique_id="unique_select_1",
options=["option 1", "option 2", "option 3"],
current_option="option 1",
),
MockSelectEntity(
name="select 2",
unique_id="unique_select_2",
options=["option 1", "option 2", "option 3"],
current_option=None,
),
]