python312Packages.bthome-ble: fix habluetooth 3.0 compat
This commit is contained in:
@@ -26,6 +26,10 @@ buildPythonPackage rec {
|
||||
hash = "sha256-v3SzzbdWRJISuF1THHlrvci4b+H1Zw/0e5iSEB0Scvw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./habluetooth-3.0-compat.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail " --cov=bthome_ble --cov-report=term-missing:skip-covered" ""
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
diff --git a/tests/test_parser_v1.py b/tests/test_parser_v1.py
|
||||
index d717263..bb03d80 100644
|
||||
--- a/tests/test_parser_v1.py
|
||||
+++ b/tests/test_parser_v1.py
|
||||
@@ -77,6 +77,7 @@ def bytes_to_service_info(
|
||||
advertisement=None,
|
||||
connectable=False,
|
||||
time=ADVERTISEMENT_TIME,
|
||||
+ tx_power=None,
|
||||
)
|
||||
|
||||
|
||||
@@ -96,6 +97,7 @@ def bytes_to_encrypted_service_info(
|
||||
advertisement=None,
|
||||
connectable=False,
|
||||
time=ADVERTISEMENT_TIME,
|
||||
+ tx_power=None,
|
||||
)
|
||||
|
||||
|
||||
@@ -1195,6 +1197,7 @@ def test_bthome_multiple_uuids(caplog):
|
||||
advertisement=None,
|
||||
connectable=False,
|
||||
time=ADVERTISEMENT_TIME,
|
||||
+ tx_power=None,
|
||||
)
|
||||
|
||||
device = BTHomeBluetoothDeviceData()
|
||||
diff --git a/tests/test_parser_v2.py b/tests/test_parser_v2.py
|
||||
index 8fee31a..3ff8bc3 100644
|
||||
--- a/tests/test_parser_v2.py
|
||||
+++ b/tests/test_parser_v2.py
|
||||
@@ -97,6 +97,7 @@ def bytes_to_service_info(
|
||||
advertisement=None,
|
||||
connectable=False,
|
||||
time=time,
|
||||
+ tx_power=None,
|
||||
)
|
||||
|
||||
|
||||
@@ -3171,6 +3172,7 @@ def test_bthome_multiple_uuids(caplog):
|
||||
advertisement=None,
|
||||
connectable=False,
|
||||
time=ADVERTISEMENT_TIME,
|
||||
+ tx_power=None,
|
||||
)
|
||||
|
||||
device = BTHomeBluetoothDeviceData()
|
||||
Reference in New Issue
Block a user