Speed up mqtt tests (#73423)
Co-authored-by: jbouwh <jan@jbsoft.nl> Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
This commit is contained in:
parent
034c0c0593
commit
51b4d15c8c
29 changed files with 281 additions and 10 deletions
|
@ -26,7 +26,7 @@ from homeassistant.components.climate.const import (
|
|||
HVACMode,
|
||||
)
|
||||
from homeassistant.components.mqtt.climate import MQTT_CLIMATE_ATTRIBUTES_BLOCKED
|
||||
from homeassistant.const import ATTR_TEMPERATURE
|
||||
from homeassistant.const import ATTR_TEMPERATURE, Platform
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from .test_common import (
|
||||
|
@ -106,6 +106,13 @@ DEFAULT_LEGACY_CONFIG = {
|
|||
}
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def climate_platform_only():
|
||||
"""Only setup the climate platform to speed up tests."""
|
||||
with patch("homeassistant.components.mqtt.PLATFORMS", [Platform.CLIMATE]):
|
||||
yield
|
||||
|
||||
|
||||
async def test_setup_params(hass, mqtt_mock_entry_with_yaml_config):
|
||||
"""Test the initial parameters."""
|
||||
assert await async_setup_component(hass, CLIMATE_DOMAIN, DEFAULT_CONFIG)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue