diff --git a/tests/data/polestar3.json b/tests/data/polestar3.json deleted file mode 100644 index bf941e6..0000000 --- a/tests/data/polestar3.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "getBatteryData": { - "averageEnergyConsumptionKwhPer100Km": 22.4, - "batteryChargeLevelPercentage": 34, - "chargerConnectionStatus": "CHARGER_CONNECTION_STATUS_DISCONNECTED", - "chargingCurrentAmps": null, - "chargingPowerWatts": null, - "chargingStatus": "CHARGING_STATUS_IDLE", - "estimatedChargingTimeMinutesToTargetDistance": 0, - "estimatedChargingTimeToFullMinutes": 0, - "estimatedDistanceToEmptyKm": 150, - "estimatedDistanceToEmptyMiles": 90, - "eventUpdatedTimestamp": { - "iso": "2024-11-11T17:47:13.000Z", - "unix": "1731347233" - } - }, - "getConsumerCarsV2": { - "content": { - "images": { - "studio": { - "url": "https://cas.polestar.com/image/dynamic/MY24_2207/359/summary-transparent-v2/EA/1/72300/R80000/R102/LR02/EV02/K503/JB07/SW01/_/ET01/default.png?market=se" - } - }, - "model": { - "name": "Polestar 3" - }, - "specification": { - "battery": "400V lithium-ion battery, 111 kWh capacity, 17 modules", - "torque": "840 Nm / 620 lbf-ft" - } - }, - "factoryCompleteDate": "2024-04-16", - "internalVehicleIdentifier": "1aaeb452-700e-46f3-9899-395b6219c8a6", - "registrationDate": null, - "registrationNo": "MLB007", - "software": { - "version": null, - "versionTimestamp": null - }, - "vin": "YSMYKEAE7RB000000" - }, - "getOdometerData": { - "averageSpeedKmPerHour": 42, - "eventUpdatedTimestamp": { - "iso": "2024-11-11T15:15:16.000Z", - "unix": "1731338116" - }, - "odometerMeters": 2001000, - "tripMeterAutomaticKm": 4.2, - "tripMeterManualKm": 1984.0 - } -} diff --git a/tests/test_models.py b/tests/test_models.py deleted file mode 100644 index 2d26175..0000000 --- a/tests/test_models.py +++ /dev/null @@ -1,26 +0,0 @@ -import json -import os -from pathlib import Path - -from polestar_api.pypolestar.models import ( - CarBatteryData, - CarInformationData, - CarOdometerData, -) - -DATADIR = Path(os.path.abspath(os.path.dirname(__file__))) / "data" - -with open(DATADIR / "polestar3.json") as fp: - POLESTAR_3 = json.load(fp) - - -def test_car_information_data(): - _ = CarInformationData.from_dict(POLESTAR_3["getConsumerCarsV2"]) - - -def test_car_battery_data(): - _ = CarBatteryData.from_dict(POLESTAR_3["getBatteryData"]) - - -def test_car_odometer_data(): - _ = CarOdometerData.from_dict(POLESTAR_3["getOdometerData"])