mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Adjust fibaro tests which create devices (#98189)
This commit is contained in:
parent
ec143b26d7
commit
52183d64ae
@ -6,10 +6,12 @@ from pyfibaro.fibaro_scene import SceneModel
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant.components.fibaro import DOMAIN, FIBARO_CONTROLLER, FIBARO_DEVICES
|
from homeassistant.components.fibaro import DOMAIN, FIBARO_CONTROLLER, FIBARO_DEVICES
|
||||||
from homeassistant.config_entries import SOURCE_USER, ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import Platform
|
from homeassistant.const import Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
from tests.common import MockConfigEntry
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||||
@ -39,13 +41,8 @@ async def setup_platform(
|
|||||||
) -> ConfigEntry:
|
) -> ConfigEntry:
|
||||||
"""Set up the fibaro platform and prerequisites."""
|
"""Set up the fibaro platform and prerequisites."""
|
||||||
hass.config.components.add(DOMAIN)
|
hass.config.components.add(DOMAIN)
|
||||||
config_entry = ConfigEntry(
|
config_entry = MockConfigEntry(domain=DOMAIN, title="Test")
|
||||||
1,
|
config_entry.add_to_hass(hass)
|
||||||
DOMAIN,
|
|
||||||
"Test",
|
|
||||||
{},
|
|
||||||
SOURCE_USER,
|
|
||||||
)
|
|
||||||
|
|
||||||
controller_mock = Mock()
|
controller_mock = Mock()
|
||||||
controller_mock.hub_serial = "HC2-111111"
|
controller_mock.hub_serial = "HC2-111111"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user