1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Config validation for MQTT

This commit is contained in:
Jan Harkes
2016-04-04 00:22:04 -04:00
parent 2e9bf42688
commit 8cca2bb344
4 changed files with 47 additions and 24 deletions

View File

@@ -4,6 +4,7 @@ from datetime import timedelta
from unittest import mock
from homeassistant import core as ha, loader
from homeassistant.bootstrap import _setup_component
from homeassistant.helpers.entity import ToggleEntity
from homeassistant.const import (
STATE_ON, STATE_OFF, DEVICE_DEFAULT_NAME, EVENT_TIME_CHANGED,
@@ -123,7 +124,7 @@ def mock_http_component(hass):
@mock.patch('homeassistant.components.mqtt.MQTT')
def mock_mqtt_component(hass, mock_mqtt):
"""Mock the MQTT component."""
mqtt.setup(hass, {
_setup_component(hass, mqtt.DOMAIN, {
mqtt.DOMAIN: {
mqtt.CONF_BROKER: 'mock-broker',
}