Skip to content

Commit

Permalink
fix: make tests compatible with habluetooth>=3
Browse files Browse the repository at this point in the history
Closes: #38
  • Loading branch information
mweinelt committed Jun 6, 2024
1 parent 7140d64 commit 0dbbe6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def test_model_from_scanner():
"service_uuids": ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"],
"source": "local",
"time": now,
"tx_power": -127,
}


Expand All @@ -109,6 +110,7 @@ def test_construct_service_info_bleak():
advertisement=switchbot_adv,
connectable=False,
time=now,
tx_power=None,
)

assert service_info.service_uuids == ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
Expand All @@ -132,6 +134,7 @@ def test_construct_service_info_bleak():
"service_uuids": ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"],
"source": "local",
"time": now,
"tx_power": None,
}


Expand Down Expand Up @@ -165,6 +168,7 @@ def test_from_device_and_advertisement_data():
"service_uuids": ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"],
"source": "local",
"time": now_monotonic,
"tx_power": -127,
}


Expand Down Expand Up @@ -200,6 +204,7 @@ class pyobjc_int(int):
advertisement=switchbot_adv,
connectable=False,
time=now,
tx_power=None,
)

assert service_info.service_uuids == ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
Expand All @@ -223,4 +228,5 @@ class pyobjc_int(int):
"service_uuids": ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"],
"source": "local",
"time": now,
"tx_power": None,
}

0 comments on commit 0dbbe6c

Please sign in to comment.