mirror of
https://github.com/meshtastic/python.git
synced 2026-04-20 14:58:54 -04:00
add simple unit test
This commit is contained in:
BIN
meshtastic/test/.test_node.py.swp
Normal file
BIN
meshtastic/test/.test_node.py.swp
Normal file
Binary file not shown.
16
meshtastic/test/test_node.py
Normal file
16
meshtastic/test/test_node.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""Meshtastic unit tests for node.py"""
|
||||
import re
|
||||
import subprocess
|
||||
import platform
|
||||
|
||||
import pytest
|
||||
|
||||
from meshtastic.node import pskToString
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_pskToString():
|
||||
"""Test pskToString"""
|
||||
assert pskToString('') == 'unencrypted'
|
||||
assert pskToString(bytes([0x00])) == 'unencrypted'
|
||||
assert pskToString(bytes([0x01])) == 'default'
|
||||
assert pskToString(bytes([0x02, 0x01])) == 'secret'
|
||||
Reference in New Issue
Block a user