fix(settings): use timezone-aware datetime for current timestamp

fix(tests): normalize stored paths in library upsert test
This commit is contained in:
Will Miao
2025-10-03 20:59:47 +08:00
parent 3af8f151ac
commit 40d998a026
2 changed files with 4 additions and 3 deletions

View File

@@ -111,7 +111,8 @@ def test_upsert_library_creates_entry_and_activates(manager, tmp_path):
assert manager.get_active_library_name() == "studio"
libraries = manager.get_libraries()
stored_paths = libraries["studio"]["folder_paths"]["loras"]
assert str(lora_dir).replace(os.sep, "/") in stored_paths
normalized_stored_paths = [p.replace(os.sep, "/") for p in stored_paths]
assert str(lora_dir).replace(os.sep, "/") in normalized_stored_paths
def test_delete_library_switches_active(manager, tmp_path):