From 076e865f77058f78b56313b412f08572461f3e27 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 21 Jan 2022 18:20:50 -0600 Subject: [PATCH] Node level test --- meshtastic/tests/test_node.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshtastic/tests/test_node.py b/meshtastic/tests/test_node.py index 96c2b71..f0b2c41 100644 --- a/meshtastic/tests/test_node.py +++ b/meshtastic/tests/test_node.py @@ -118,6 +118,14 @@ def test_reboot(caplog): anode.reboot() assert re.search(r'Telling node to reboot', caplog.text, re.MULTILINE) +@pytest.mark.unit +def test_shutdown(caplog): + """Test shutdown""" + anode = Node('foo', 'bar', noProto=True) + with caplog.at_level(logging.DEBUG): + anode.shutdown() + assert re.search(r'Telling node to shutdown', caplog.text, re.MULTILINE) + @pytest.mark.unit def test_setURL_empty_url(capsys):