mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-05-23 16:18:47 +01:00
4ac7f7dcf0
* Rename Hass.io -> Supervisor * part 2 * fix lint * fix auth name
22 lines
503 B
Python
22 lines
503 B
Python
"""Test validate of discovery."""
|
|
|
|
import voluptuous as vol
|
|
import pytest
|
|
|
|
from supervisor.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)
|