Example #1
0
def test_bad_config():
    """Test good zwave mqtt config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config("ozw", {
            "host": "test",
            "username": "******",
            "ssl": True
        })
Example #2
0
def test_bad_config():
    """Test good homematic config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config("homematic",
                               {"test": {
                                   "bla": "test",
                                   "port": 8080
                               }})
Example #3
0
def test_good_config():
    """Test good mqtt config."""

    valid_discovery_config("mqtt", {
        "host": "test",
        "port": 3812,
        "username": "******",
        "ssl": True
    })
Example #4
0
def test_good_config():
    """Test good zwave js config."""

    valid_discovery_config(
        "zwave_js",
        {
            "host": "test",
            "port": 3812
        },
    )
Example #5
0
def test_good_config():
    """Test good vlc telnet config."""

    valid_discovery_config(
        "vlc_telnet",
        {
            "host": "test",
            "port": 3812,
            "password": "******"
        },
    )
Example #6
0
def test_good_config():
    """Test good zwave mqtt config."""

    valid_discovery_config(
        "ozw",
        {
            "host": "test",
            "port": 3812,
            "username": "******",
            "password": "******"
        },
    )
Example #7
0
def test_good_config():
    """Test good deconz config."""

    valid_discovery_config(
        "deconz",
        {
            "host": "test",
            "port": 3812,
            "api_key": "MY_api_KEY99",
            "serial": "xyz"
        },
    )
Example #8
0
def test_good_config():
    """Test good homematic config."""

    valid_discovery_config(
        "homematic",
        {
            "ip": {
                "host": "test",
                "port": 3812
            },
            "rf": {
                "host": "test",
                "port": 3712
            }
        },
    )
Example #9
0
def test_bad_config():
    """Test good unifi config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config("unifi", {"host": "test"})
Example #10
0
def test_bad_config():
    """Test good deconz config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config("deconz", {"host": "test", "port": 8080})
Example #11
0
def test_good_config() -> None:
    """Test good motionEye config."""
    valid_discovery_config("motioneye", {"url": "http://example.com:1234"})
Example #12
0
def test_bad_config():
    """Test good zwave js config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config("zwave_js", {"host": "test"})
Example #13
0
def test_bad_config() -> None:
    """Test good motionEye config."""
    with pytest.raises(vol.Invalid):
        valid_discovery_config("motioneye", {})
Example #14
0
def test_good_config():
    """Test good unifi config."""

    valid_discovery_config("unifi", {"host": "test", "port": 3812})
Example #15
0
def test_bad_config():
    """Test bad config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config(SERVICE, {"host": "test"})
Example #16
0
def test_bad_config():
    """Test good adguard config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config("almond", {"host": "test"})
Example #17
0
def test_bad_config():
    """Test bad vlc telnet config."""

    with pytest.raises(vol.Invalid):
        valid_discovery_config("vlc_telnet", {"host": "test", "port": 8283})
Example #18
0
def test_good_config():
    """Test good deconz config."""

    valid_discovery_config("almond", {"host": "test", "port": 3812})
Example #19
0
def test_good_config():
    """Test good config."""

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