mirror of
https://github.com/meshtastic/python.git
synced 2025-12-30 11:27:53 -05:00
17 lines
416 B
Python
17 lines
416 B
Python
"""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'
|