15 lines
568 B
Python
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"
|