mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-05-12 04:53:31 -04:00
fix: Update backend normalization to match search normalization logic (#7603)
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import filecmp
|
||||
import statistics
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy.orm import Session
|
||||
@@ -32,17 +30,6 @@ def dict_sorter(d: dict) -> Any:
|
||||
return next((d[key] for key in possible_keys if d.get(key)), 1)
|
||||
|
||||
|
||||
# For Future Use
|
||||
def match_file_tree(path_a: Path, path_b: Path):
|
||||
if path_a.is_dir() and path_b.is_dir():
|
||||
for a_file in path_a.iterdir():
|
||||
b_file = path_b.joinpath(a_file.name)
|
||||
assert b_file.exists()
|
||||
match_file_tree(a_file, b_file)
|
||||
else:
|
||||
assert filecmp.cmp(path_a, path_b)
|
||||
|
||||
|
||||
def test_database_backup():
|
||||
backup_v2 = BackupV2()
|
||||
path_to_backup = backup_v2.backup()
|
||||
|
||||
Reference in New Issue
Block a user