mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-04-17 23:33:35 +01:00
* Add known first party to isort configuration * Run isort on supervisor and tests folder
20 lines
418 B
Python
20 lines
418 B
Python
"""Test unifi discovery."""
|
|
|
|
import pytest
|
|
import voluptuous as vol
|
|
|
|
from supervisor.discovery.validate import valid_discovery_config
|
|
|
|
|
|
def test_good_config():
|
|
"""Test good unifi config."""
|
|
|
|
valid_discovery_config("unifi", {"host": "test", "port": 3812})
|
|
|
|
|
|
def test_bad_config():
|
|
"""Test good unifi config."""
|
|
|
|
with pytest.raises(vol.Invalid):
|
|
valid_discovery_config("unifi", {"host": "test"})
|