Initial commit: Shelly Manager with Textual CLI, Streamlit UI, and comprehensive .gitignore
Shelly device management app with mDNS/subnet discovery, inventory, configuration, and mass operations for Gen1/Gen2+ devices. Includes .gitignore excluding runtime data (device DB, user config), AI conversation history, build artifacts, and common Python/OS patterns.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
"""config_patch deep merge."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from shelly_manager.core.config_patch import deep_merge_dict
|
||||
|
||||
|
||||
def test_deep_merge_nested() -> None:
|
||||
base = {"mqtt": {"enable": True, "server": "old"}, "sys": {"debug": 0}}
|
||||
patch = {"mqtt": {"server": "new", "enable": False}}
|
||||
out = deep_merge_dict(base, patch)
|
||||
assert out["mqtt"]["server"] == "new"
|
||||
assert out["mqtt"]["enable"] is False
|
||||
assert out["sys"]["debug"] == 0
|
||||
|
||||
|
||||
def test_deep_merge_adds_key() -> None:
|
||||
out = deep_merge_dict({"a": 1}, {"b": {"c": 2}})
|
||||
assert out == {"a": 1, "b": {"c": 2}}
|
||||
Reference in New Issue
Block a user