fix: stabilize test suite by ensuring proper test DB isolation and initialization

This commit is contained in:
2026-04-09 02:31:03 -04:00
parent a2d07bd67c
commit 551664bc43
85 changed files with 552 additions and 61 deletions

27
tests/test_ini_spaces.py Normal file
View File

@@ -0,0 +1,27 @@
from decnet.ini_loader import load_ini_from_string
def test_load_ini_with_spaces_around_equals():
content = """
[general]
interface = eth0
[omega-decky]
services = http, ssh
"""
cfg = load_ini_from_string(content)
assert cfg.interface == "eth0"
assert len(cfg.deckies) == 1
assert cfg.deckies[0].name == "omega-decky"
assert cfg.deckies[0].services == ["http", "ssh"]
def test_load_ini_with_tabs_and_spaces():
content = """
[general]
interface = eth0
[omega-decky]
services = http, ssh
"""
cfg = load_ini_from_string(content)
assert cfg.interface == "eth0"
assert cfg.deckies[0].services == ["http", "ssh"]