supervisor/tests/discovery/test_ozw.py
Franck Nijhof 1d83c0c77a
Update isort configuration and sorts imports in codebase (#1739)
* Add known first party to isort configuration

* Run isort on supervisor and tests folder
2020-05-21 13:30:54 +02:00

22 lines
515 B
Python

"""Test Zwave MQTT discovery."""
import pytest
import voluptuous as vol
from supervisor.discovery.validate import valid_discovery_config
def test_good_config():
"""Test good zwave mqtt config."""
valid_discovery_config(
"ozw", {"host": "test", "port": 3812, "username": "bla", "password": "test"},
)
def test_bad_config():
"""Test good zwave mqtt config."""
with pytest.raises(vol.Invalid):
valid_discovery_config("ozw", {"host": "test", "username": "bla", "ssl": True})