1
mirror of https://github.com/home-assistant/supervisor synced 2024-09-07 16:20:07 +02:00
ha-supervisor/tests/discovery/test_ozw.py

23 lines
526 B
Python
Raw Normal View History

"""Test OpenZwave 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(
2020-08-26 23:01:29 +02:00
"ozw",
{"host": "test", "port": 3812, "username": "bla", "password": "test"},
)
def test_bad_config():
2022-01-05 10:01:00 +01:00
"""Test bad zwave mqtt config."""
with pytest.raises(vol.Invalid):
2020-05-19 16:54:50 +02:00
valid_discovery_config("ozw", {"host": "test", "username": "bla", "ssl": True})