Skip to content

Commit

Permalink
Merge pull request #85 from ramonsaraiva/known-issues
Browse files Browse the repository at this point in the history
✏️ Sync with PUBG API known issues
  • Loading branch information
ramonsaraiva authored Sep 16, 2019
2 parents ec34886 + 9f738dd commit 67ad249
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pubg_python/domain/telemetry/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def from_dict(self):
self.vehicle_type = self._data.get('vehicleType')
self.vehicle_id = self._data.get('vehicleId')
self.health_percent = self._data.get('healthPercent')
self.fuel_percent = self._data.get('fuelPercent')
# TODO: update feulPercent when fixed in API
self.fuel_percent = self._data.get('feulPercent')

def __str__(self):
return self.name
Expand Down
6 changes: 5 additions & 1 deletion tests/test_telemetry_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,14 @@ def test_log_vault_start():

def test_log_vehicle_ride():
events = telemetry.events_from_type('LogVehicleRide')
data = events[223]
data = events[256]
assert isinstance(data, LogVehicleRide)
assert isinstance(data.character, Character)
assert isinstance(data.vehicle, Vehicle)
if data.vehicle.health_percent != 100:
assert isinstance(data.vehicle.health_percent, float)
assert isinstance(data.vehicle.fuel_percent, float)
assert isinstance(data.vehicle, Vehicle)
assert isinstance(data.fellow_passengers[0], Character)
assert isinstance(data.seat_index, int)
assert str(data.vehicle) in VEHICLE_MAP_VALUES
Expand Down

0 comments on commit 67ad249

Please sign in to comment.