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)
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()