hass-core/tests/components/zwave/test_init.py
Paulus Schoutsen 855756cb2a Add first pass at Z-Wave light tests (#6483)
* Add first pass at Z-Wave light tests

* Remove unused SIGNAL_VALUE

* Lint

* Update test_init.py
2017-03-09 14:35:04 +01:00

36 lines
840 B
Python

"""Tests for the Z-Wave init."""
import asyncio
from homeassistant.bootstrap import async_setup_component
@asyncio.coroutine
def test_valid_device_config(hass, mock_openzwave):
"""Test valid device config."""
device_config = {
'light.kitchen': {
'ignored': 'true'
}
}
result = yield from async_setup_component(hass, 'zwave', {
'zwave': {
'device_config': device_config
}})
assert result
@asyncio.coroutine
def test_invalid_device_config(hass, mock_openzwave):
"""Test invalid device config."""
device_config = {
'light.kitchen': {
'some_ignored': 'true'
}
}
result = yield from async_setup_component(hass, 'zwave', {
'zwave': {
'device_config': device_config
}})
assert not result