Files
kota-technician-tool/tests/test_ports.py
T
kkallas e5a33a1c34 Technician tool v0.1
Imported from the Google Drive folder 004-technician_tool/v0.1.
2026-09-26 16:11:07 +02:00

15 lines
568 B
Python

from kota_tech.serialio.ports import PortInfo
def test_native_usb_port_identified_with_mac():
p = PortInfo("COM7", "USB Serial Device", 0x303A, 0x1001, "14:c1:9f:57:72:0c")
assert p.is_sensorbox
assert p.mac == "14:C1:9F:57:72:0C"
assert "Sensorbox (native USB)" in p.label and "14:C1:9F:57:72:0C" in p.label
def test_other_ports_not_sensorbox():
bt = PortInfo("COM3", "Standard Serial over Bluetooth link", None, None, None)
assert not bt.is_sensorbox and bt.mac is None
assert bt.label == "COM3 - Standard Serial over Bluetooth link"