mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 02:38:10 +02:00
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:
@ -209,6 +209,7 @@ from homeassistant.const import (
|
||||
STATE_OFF,
|
||||
STATE_ON,
|
||||
STATE_UNKNOWN,
|
||||
Platform,
|
||||
)
|
||||
import homeassistant.core as ha
|
||||
from homeassistant.setup import async_setup_component
|
||||
@ -251,6 +252,13 @@ DEFAULT_CONFIG = {
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def light_platform_only():
|
||||
"""Only setup the light platform to speed up tests."""
|
||||
with patch("homeassistant.components.mqtt.PLATFORMS", [Platform.LIGHT]):
|
||||
yield
|
||||
|
||||
|
||||
async def test_fail_setup_if_no_command_topic(hass, mqtt_mock_entry_no_yaml_config):
|
||||
"""Test if command fails with command topic."""
|
||||
assert await async_setup_component(
|
||||
|
Reference in New Issue
Block a user