mirror of
https://github.com/home-assistant/supervisor
synced 2024-08-05 03:49:58 +02:00
23 lines
529 B
Python
23 lines
529 B
Python
"""Test HomeMatic discovery."""
|
|
|
|
import pytest
|
|
import voluptuous as vol
|
|
|
|
from supervisor.discovery.validate import valid_discovery_config
|
|
|
|
|
|
def test_good_config():
|
|
"""Test good homematic config."""
|
|
|
|
valid_discovery_config(
|
|
"homematic",
|
|
{"ip": {"host": "test", "port": 3812}, "rf": {"host": "test", "port": 3712}},
|
|
)
|
|
|
|
|
|
def test_bad_config():
|
|
"""Test bad homematic config."""
|
|
|
|
with pytest.raises(vol.Invalid):
|
|
valid_discovery_config("homematic", {"test": {"bla": "test", "port": 8080}})
|