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