Skip to content

Commit dfd5469

Browse files
committed
Ensure fixtures
1 parent e1d7294 commit dfd5469

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

fixtures/airos_mocked_sta-ptmp.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
"access_point": false,
1414
"mac": "01:23:45:67:89:CD",
1515
"mac_interface": "br0",
16+
"mode": "point_to_multipoint",
1617
"ptmp": true,
1718
"ptp": false,
19+
"role": "station",
20+
"sku": "UNKNOWN",
1821
"station": true
1922
},
2023
"firewall": {
@@ -25,14 +28,19 @@
2528
},
2629
"genuine": "/images/genuine.png",
2730
"gps": {
31+
"alt": 248.6,
32+
"dim": 3,
33+
"dop": 0.91,
2834
"fix": 0,
2935
"lat": 52.379894,
30-
"lon": 4.901608
36+
"lon": 4.901608,
37+
"sats": 9,
38+
"time_synced": 0
3139
},
3240
"host": {
3341
"cpuload": 44.0,
3442
"device_id": "d4f4cdf82961e619328a8f72f8d7653b",
35-
"devmodel": "NanoStation 5AC loco",
43+
"devmodel": "NanoStation 5AC loco unexisting",
3644
"freeram": 16105472,
3745
"fwversion": "v8.7.17",
3846
"height": 2,
@@ -541,7 +549,7 @@
541549
"netrole": "bridge",
542550
"noisefloor": -89,
543551
"oob": false,
544-
"platform": "NanoStation 5AC loco",
552+
"platform": "NanoStation 5AC loco unexisting",
545553
"power_time": 268736,
546554
"rssi": 36,
547555
"rx_bytes": 207021597130,
@@ -971,7 +979,7 @@
971979
"netrole": "bridge",
972980
"noisefloor": -89,
973981
"oob": false,
974-
"platform": "NanoStation 5AC loco",
982+
"platform": "NanoStation 5AC loco unexisting",
975983
"power_time": 268736,
976984
"rssi": 36,
977985
"rx_bytes": 207021597130,

script/generate_ha_fixture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def generate_airos_fixtures() -> None:
3434

3535
# Iterate over all files in the userdata_dir
3636
for filename in os.listdir(userdata_dir): # noqa: PTH208
37-
if "mocked" in filename:
37+
if filename != "mocked_sta-ptmp.json" and "mocked" in filename:
3838
continue
3939
if filename.endswith(".json"):
4040
# Construct the full paths for the base and new fixtures

script/mashumaro-step-debug.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ def main() -> None:
128128
data, AirOS8.derived_wireless_data
129129
)
130130
_LOGGER.info("Attempting to deserialize full AirOS8Data object...")
131-
airos_data_obj = AirOS8Data.from_dict(derived_data) # noqa: F841
131+
airos_data_obj = AirOS8Data.from_dict(derived_data)
132132
_LOGGER.info("Success! Full AirOS8Data object is valid.")
133+
_LOGGER.info("SKU-check: %s", airos_data_obj.derived.sku)
133134

134135
except Exception:
135136
_LOGGER.info("\n------------------")

0 commit comments

Comments
 (0)