mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 01:35:36 -04:00
Fall back from invalid preset stores (#1402)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import json
|
||||
|
||||
from src.preset_manager import PresetManager
|
||||
|
||||
|
||||
def test_non_object_preset_store_falls_back_to_defaults(tmp_path):
|
||||
(tmp_path / "presets.json").write_text(json.dumps([]))
|
||||
|
||||
manager = PresetManager(str(tmp_path))
|
||||
|
||||
assert manager.presets == PresetManager.DEFAULT_PRESETS
|
||||
assert manager.get("custom")["enabled"] is False
|
||||
Reference in New Issue
Block a user