mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-05-08 17:08:36 +01:00
1d83c0c77a
* Add known first party to isort configuration * Run isort on supervisor and tests folder
23 lines
504 B
Python
23 lines
504 B
Python
"""Test DeConz discovery."""
|
|
|
|
import pytest
|
|
import voluptuous as vol
|
|
|
|
from supervisor.discovery.validate import valid_discovery_config
|
|
|
|
|
|
def test_good_config():
|
|
"""Test good deconz config."""
|
|
|
|
valid_discovery_config(
|
|
"deconz",
|
|
{"host": "test", "port": 3812, "api_key": "MY_api_KEY99", "serial": "xyz"},
|
|
)
|
|
|
|
|
|
def test_bad_config():
|
|
"""Test good deconz config."""
|
|
|
|
with pytest.raises(vol.Invalid):
|
|
valid_discovery_config("deconz", {"host": "test", "port": 8080})
|