Skip to content

Commit

Permalink
Use syrupy (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek authored Oct 21, 2023
1 parent 94939d7 commit dfb0a49
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 52 deletions.
46 changes: 17 additions & 29 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ python = "^3.10"
aiohttp = ">=3.0.0"
yarl = ">=1.6.0"
pydantic = ">=1.10.8"
syrupy = "^4.5.0"

[tool.poetry.group.dev.dependencies]
aresponses = "2.1.6"
Expand Down
88 changes: 88 additions & 0 deletions tests/__snapshots__/test_states.ambr
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# serializer version: 1
# name: test_states
dict({
'states': list([
dict({
'barometric_altitude': 2217.42,
'callsign': 'UAL421 ',
'category': <AircraftCategory.LARGE: 4>,
'geo_altitude': 2194.56,
'icao24': 'ab1644',
'last_contact': 1683488743,
'latitude': 42.5372,
'longitude': -71.1656,
'on_ground': False,
'origin_country': 'United States',
'position_source': <PositionSource.ADSB: 0>,
'sensors': None,
'special_purpose_indicator': False,
'time_position': 1683488743,
'transponder_code': None,
'true_track': 342.17,
'velocity': 137.8,
'vertical_rate': 13.0,
}),
dict({
'barometric_altitude': None,
'callsign': 'LPE2264 ',
'category': <AircraftCategory.NO_ADS_INFORMATION: 1>,
'geo_altitude': None,
'icao24': 'e8027e',
'last_contact': 1683488722,
'latitude': -12.0115,
'longitude': -77.1296,
'on_ground': True,
'origin_country': 'Chile',
'position_source': <PositionSource.ADSB: 0>,
'sensors': None,
'special_purpose_indicator': False,
'time_position': 1683488479,
'transponder_code': None,
'true_track': 149.16,
'velocity': 83.29,
'vertical_rate': 9.1,
}),
dict({
'barometric_altitude': 4335.78,
'callsign': 'LPE2392 ',
'category': <AircraftCategory.NO_ADS_INFORMATION: 1>,
'geo_altitude': None,
'icao24': 'e8027d',
'last_contact': 1683488743,
'latitude': -11.905,
'longitude': -76.9275,
'on_ground': False,
'origin_country': 'Chile',
'position_source': <PositionSource.ADSB: 0>,
'sensors': None,
'special_purpose_indicator': False,
'time_position': 1683488743,
'transponder_code': None,
'true_track': 332.17,
'velocity': 187.32,
'vertical_rate': 10.4,
}),
dict({
'barometric_altitude': 701.04,
'callsign': 'N28CN ',
'category': <AircraftCategory.GLIDER: 9>,
'geo_altitude': 685.8,
'icao24': 'a2cbe1',
'last_contact': 1683488743,
'latitude': 44.9762,
'longitude': -93.9953,
'on_ground': False,
'origin_country': 'United States',
'position_source': <PositionSource.ADSB: 0>,
'sensors': None,
'special_purpose_indicator': False,
'time_position': 1683488743,
'transponder_code': None,
'true_track': 293.15,
'velocity': 73.29,
'vertical_rate': -4.55,
}),
]),
'time': 1683488744,
})
# ---
Loading

0 comments on commit dfb0a49

Please sign in to comment.