Speed up zha tests (#73627)
This commit is contained in:
parent
bf15df75dd
commit
4bc5d7bfed
24 changed files with 347 additions and 4 deletions
|
@ -37,7 +37,7 @@ from homeassistant.components.zha.core.const import (
|
|||
GROUP_IDS,
|
||||
GROUP_NAME,
|
||||
)
|
||||
from homeassistant.const import ATTR_NAME
|
||||
from homeassistant.const import ATTR_NAME, Platform
|
||||
from homeassistant.core import Context
|
||||
|
||||
from .conftest import (
|
||||
|
@ -53,6 +53,20 @@ IEEE_SWITCH_DEVICE = "01:2d:6f:00:0a:90:69:e7"
|
|||
IEEE_GROUPABLE_DEVICE = "01:2d:6f:00:0a:90:69:e8"
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def required_platform_only():
|
||||
"""Only setup the required and required base platforms to speed up tests."""
|
||||
with patch(
|
||||
"homeassistant.components.zha.PLATFORMS",
|
||||
(
|
||||
Platform.SELECT,
|
||||
Platform.SENSOR,
|
||||
Platform.SWITCH,
|
||||
),
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def device_switch(hass, zigpy_device_mock, zha_device_joined):
|
||||
"""Test zha switch platform."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue