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:
J. Nick Koston 2022-06-13 10:17:10 -10:00 committed by GitHub
parent 034c0c0593
commit 51b4d15c8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 281 additions and 10 deletions

View file

@ -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)