mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-04-02 08:12:47 +01:00
* Support for deconz discovery & cleanup * Split discovery * Fix lint * Fix lint / import
22 lines
499 B
Python
22 lines
499 B
Python
"""Test validate of discovery."""
|
|
|
|
import voluptuous as vol
|
|
import pytest
|
|
|
|
from hassio.discovery import validate
|
|
|
|
|
|
def test_valid_services():
|
|
"""Validate that service is valid."""
|
|
|
|
for service in ("mqtt", "deconz"):
|
|
validate.valid_discovery_service(service)
|
|
|
|
|
|
def test_invalid_services():
|
|
"""Test that validate is invalid for a service."""
|
|
|
|
for service in ("fadsfasd", "203432"):
|
|
with pytest.raises(vol.Invalid):
|
|
validate.valid_discovery_service(service)
|