forked from retoor/devplacepy
Add personal notes, DeepSearch history, backup offload, and gateway auth throttling
Also streamline the top navigation: drop the Tools dropdown, make Quizzes and Battles icon-only entries, and remove the Workspace, Containers and Editor entry points from the project detail page.
This commit is contained in:
@@ -518,6 +518,30 @@ def test_sweep_orphan_project_file_blobs_keeps_blob_referenced_only_by_soft_dele
|
||||
assert (tmp_path / directory / stored_name).exists()
|
||||
|
||||
|
||||
def test_export_to_dir_summarizes_missing_blobs(local_db, tmp_path, monkeypatch, caplog):
|
||||
import logging
|
||||
|
||||
monkeypatch.setattr(pf, "PROJECT_FILES_DIR", tmp_path)
|
||||
uid = _insert_binary_node("export-missing-proj", "ab/cd", "gone.bin")
|
||||
dest = tmp_path / "out"
|
||||
dest.mkdir()
|
||||
pf._table().update(
|
||||
{
|
||||
"uid": uid,
|
||||
"path": "gone.bin",
|
||||
"name": "gone.bin",
|
||||
"parent_path": "",
|
||||
},
|
||||
["uid"],
|
||||
)
|
||||
with caplog.at_level(logging.WARNING, logger="devplacepy.project_files"):
|
||||
written = pf.export_to_dir("export-missing-proj", "", dest)
|
||||
assert written == 0
|
||||
messages = [record.getMessage() for record in caplog.records]
|
||||
assert any("Skipped 1 missing blob" in message for message in messages)
|
||||
assert not any("Blob file missing" in message for message in messages)
|
||||
|
||||
|
||||
def test_sweep_orphan_project_file_blobs_dry_run_changes_nothing(local_db, tmp_path, monkeypatch):
|
||||
monkeypatch.setattr(pf, "PROJECT_FILES_DIR", tmp_path)
|
||||
directory = "ab/cd"
|
||||
|
||||
Reference in New Issue
Block a user