async def test_Vehicle_Controls_Speedlimit_set_speed_limit(client, mocker): v = vehi(client, mocker, {"result": True}) speedlimit = v.controls.speedlimit with pytest.raises(ValueError): await speedlimit.set_speed_limit(99999) with pytest.raises(KeyError): v._data.pop("gui_settings") await speedlimit.set_speed_limit(90)
async def test_Vehicle_Status_refresh(client, mocker): v = vehi(client, mocker, DRIVE_STATE) r = await v.status.refresh() assert isinstance(r, dict)
async def test_Vehicle_Controls_Speedlimit_activate_speed_limit(client, mocker): v = vehi(client, mocker, {"result": True}) speedlimit = v.controls.speedlimit assert await speedlimit.activate_speed_limit(9999) is True
async def test_Vehicle_Controls_Software_update(client, mocker): v = vehi(client, mocker, {"result": True}) software = v.controls.software assert await software.update(datetime.now()) assert await software.update(99999)
async def test_Vehicle_Controls_Software_cancel_update(client, mocker): v = vehi(client, mocker, {"result": True}) software = v.controls.software assert await software.cancel_update()
async def test_Vehicle_Charge_refresh(client, mocker): v = vehi(client, mocker, CHARGE_STATE) charge = v.charge data = await charge.refresh() assert isinstance(data, dict)
async def test_Vehicle_refresh(client, mocker): v = vehi(client, mocker, CLIMATE_STATE) data = await v.climate.refresh() assert data == CLIMATE_STATE
async def test_Vehicle_get_state(client, mocker): v = vehi(client, mocker, VEHICLE_STATE) r = await v.get_state() assert isinstance(r, dict)
async def test_Vehicle_get_drive_state(client, mocker): v = vehi(client, mocker, DRIVE_STATE) r = await v.get_data() assert r == DRIVE_STATE
async def test_Vehicle_get_data(client, mocker): v = vehi(client, mocker, CHARGE_STATE) r = await v.get_data() assert r == CHARGE_STATE
async def test_Vehicle_full_update(client, mocker): v = vehi(client, mocker, FULL_DATA) r = await v.get_data() assert r == FULL_DATA
async def test_Vehicle_is_mobile_access_enabled(client, mocker): v = vehi(client, mocker, True) result = await v.is_mobile_access_enabled() assert result is True
async def test_Vehicle_get_climate_state(client, mocker): v = vehi(client, mocker, CLIMATE_STATE) r = await v.get_climate_state() assert r == CLIMATE_STATE
async def test_Vehicle_get_charge_state(client, mocker): v = vehi(client, mocker, CHARGE_STATE) r = await v.get_charge_state() assert r == CHARGE_STATE
async def test_Vehicle_refresh(client, mocker): v = vehi(client, mocker, ATTRS) r = await v.refresh() assert r == ATTRS
async def test_Vehicle_get_gui_settings(client, mocker): v = vehi(client, mocker, GUI_SETTINGS) r = await v.get_data() assert r == GUI_SETTINGS