Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add failing test for TC.x in passive mode #36

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pytest
from bluetooth_sensor_state_data import BluetoothServiceInfo, DeviceClass, SensorUpdate
from sensor_state_data import (
DeviceKey,
Expand Down Expand Up @@ -1641,6 +1642,7 @@ def test_tcx_overwriting_mfr_data():
)



bdraco marked this conversation as resolved.
Show resolved Hide resolved
def test_tc_detection_active_scans():
parser = SensorPushBluetoothDeviceData()
service_info = BluetoothServiceInfo(
Expand Down Expand Up @@ -1742,3 +1744,19 @@ def test_tc_detection_active_scans_2():
),
},
)


def test_tcx_passive_scans():
parser = SensorPushBluetoothDeviceData()
service_info = BluetoothServiceInfo(
name="aa:bb:cc:dd:ee:ff",
manufacturer_data={36619: b"\xe4\x02\x81", 8: b"\x00\x00\x00"},
service_data={},
service_uuids=["ef090000-11d6-42ba-93b8-9dd7ec090ab0"],
address="aa:bb:cc:dd:ee:ff",
rssi=-60,
source="local",
)
result = parser.update(service_info)
pytest.xfail("Currently detected as HT.w")
assert result.devices[None].model == "TC.x"
Loading