mirror of
https://github.com/meshtastic/python.git
synced 2026-04-20 06:47:44 -04:00
fixes for working on mac air
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
"""Meshtastic unit tests for ble_interface.py"""
|
||||
|
||||
|
||||
from unittest.mock import patch
|
||||
import pytest
|
||||
|
||||
from ..ble_interface import BLEInterface
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_BLEInterface():
|
||||
@patch('platform.system', return_value='Linux')
|
||||
def test_BLEInterface(mock_platform):
|
||||
"""Test that we can instantiate a BLEInterface"""
|
||||
iface = BLEInterface('foo', debugOut=True, noProto=True)
|
||||
iface.close()
|
||||
|
||||
@@ -418,6 +418,7 @@ def test_sendPacket_with_destination_as_LOCAL_ADDR_with_myInfo(caplog, reset_glo
|
||||
iface = MeshInterface(noProto=True)
|
||||
myInfo = MagicMock()
|
||||
iface.myInfo = myInfo
|
||||
iface.myInfo.my_node_num = 1
|
||||
with caplog.at_level(logging.DEBUG):
|
||||
meshPacket = mesh_pb2.MeshPacket()
|
||||
iface._sendPacket(meshPacket, destinationId=LOCAL_ADDR)
|
||||
|
||||
Reference in New Issue
Block a user