Пример #1
0
def test_good_config():
    """Test good mqtt config."""

    valid_discovery_config("mqtt", {
        "host": "test",
        "port": 3812,
        "username": "******",
        "ssl": True
    })
Пример #2
0
def test_bad_config():
    """Test good mqtt config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config("mqtt", {
            "host": "test",
            "username": "******",
            "ssl": True
        })
def test_good_config():
    """Test good deconz config."""

    valid_discovery_config(
        "deconz",
        {
            "host": "test",
            "port": 3812,
            "api_key": "MY_api_KEY99",
            "serial": "xyz"
        },
    )
Пример #4
0
def test_good_config():
    """Test good deconz config."""

    valid_discovery_config("deconz", {"host": "test", "port": 3812})
Пример #5
0
def test_bad_config():
    """Test good deconz config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config("deconz", {"host": "test"})
Пример #6
0
def test_bad_config():
    """Test good adguard config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config("home_panel", {"host": "test"})
Пример #7
0
def test_good_config():
    """Test good unifi config."""

    valid_discovery_config("unifi", {"host": "test", "port": 3812})