mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00: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:
@@ -23,6 +23,7 @@ from homeassistant.const import (
|
||||
ATTR_ASSUMED_STATE,
|
||||
ATTR_ENTITY_ID,
|
||||
ATTR_UNIT_OF_MEASUREMENT,
|
||||
Platform,
|
||||
)
|
||||
import homeassistant.core as ha
|
||||
from homeassistant.setup import async_setup_component
|
||||
@@ -64,6 +65,13 @@ DEFAULT_CONFIG = {
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def number_platform_only():
|
||||
"""Only setup the number platform to speed up tests."""
|
||||
with patch("homeassistant.components.mqtt.PLATFORMS", [Platform.NUMBER]):
|
||||
yield
|
||||
|
||||
|
||||
async def test_run_number_setup(hass, mqtt_mock_entry_with_yaml_config):
|
||||
"""Test that it fetches the given payload."""
|
||||
topic = "test/number"
|
||||
|
||||
Reference in New Issue
Block a user