Exemple #1
0
async def test_get_devices_not_adopted_enabled(protect_client: ProtectApiClient, cameras):
    cameras[0]["isAdopted"] = False
    protect_client.ignore_unadopted = False
    protect_client.api_request_list = AsyncMock(return_value=cameras)  # type: ignore

    assert len(await protect_client.get_cameras()) == len(cameras)
Exemple #2
0
async def test_get_devices_mismatch(protect_client: ProtectApiClient, cameras):
    protect_client.api_request_list = AsyncMock(return_value=cameras)  # type: ignore

    with pytest.raises(NvrError):
        await protect_client.get_bridges()