Inventory: automatically create emtpy file on write

This commit is contained in:
Johannes Kirschbauer
2025-02-10 12:13:54 +07:00
committed by hsjobeki
parent f380046050
commit 048bd37e3b
3 changed files with 15 additions and 6 deletions

View File

@@ -1,4 +1,6 @@
# Functions to test
from typing import Any
import pytest
from clan_cli.errors import ClanError
from clan_cli.inventory import (
@@ -370,7 +372,7 @@ def test_dont_persist_defaults() -> None:
"enabled": True,
"config": {"foo": "bar"},
}
data_disk = {}
data_disk: dict[str, Any] = {}
writeables = determine_writeability(prios, data_eval, data_disk)
assert writeables == {"writeable": {"config", "enabled"}, "non_writeable": set()}