

@mock.patch('homeassistant.components.mqtt.MQTT')
def mock_mqtt_component(hass, mock_mqtt):
    'Mock the MQTT component.'
    _setup_component(hass, mqtt.DOMAIN, {
        mqtt.DOMAIN: {
            mqtt.CONF_BROKER: 'mock-broker',
        },
    })
    return mock_mqtt

dataset/ETHPy150Open home-assistant/home-assistant/tests/common.py mock_mqtt_component/original