Esempio n. 1
0
def test__filter_event_type_none():
    test_ksh = KodakSmartHome("fake_user", "fake_pass")
    test_ksh.is_connected = True
    test_ksh.events = [
        {
            "device_id": devices_response["data"]["devices"][0]["device_id"],
            "events": events_response["data"]["events"],
        }
    ]
    test_ksh.devices = devices_response["data"]["devices"]

    test_result = test_ksh._filter_event_type(device_id=None)

    assert len(test_result) == 2
Esempio n. 2
0
def test__filter_event_type_disconnected():
    test_ksh = KodakSmartHome("fake_user", "fake_pass")
    test_ksh.is_connected = False

    with pytest.raises(ConnectionError):
        test_ksh._filter_event_type(device_id=None)