mirror of
https://github.com/pdxlocations/contact.git
synced 2026-03-28 17:12:35 +01:00
16 lines
604 B
Python
16 lines
604 B
Python
import unittest
|
|
|
|
from contact.utilities.control_utils import transform_menu_path
|
|
|
|
|
|
class ControlUtilsTests(unittest.TestCase):
|
|
def test_transform_menu_path_applies_replacements_and_normalization(self) -> None:
|
|
transformed = transform_menu_path(["Main Menu", "Radio Settings", "Channel 2", "Detail"])
|
|
|
|
self.assertEqual(transformed, ["config", "channel", "Detail"])
|
|
|
|
def test_transform_menu_path_preserves_unmatched_entries(self) -> None:
|
|
transformed = transform_menu_path(["Main Menu", "Module Settings", "WiFi"])
|
|
|
|
self.assertEqual(transformed, ["module", "WiFi"])
|