fixes for working on mac air

This commit is contained in:
Mike Kinney
2022-01-11 16:36:39 -08:00
parent 9e74ead54e
commit bc17e9b389
7 changed files with 22 additions and 6 deletions

View File

@@ -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()

View File

@@ -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)