refactor: remove manual refresh and search controls
ci / gitleaks (push) Successful in 8s
ci / docker (push) Successful in 7m17s

This commit is contained in:
2026-09-19 21:15:23 +08:00
parent 0cf1c49094
commit 4973d56a64
29 changed files with 244 additions and 860 deletions
+7 -4
View File
@@ -160,7 +160,8 @@ def test_zip_v2_round_trip_includes_history_exception_and_attachment_bytes(clien
json={"preflight_token": preflight.json()["preflight_token"], "mode": "replace"},
)
assert restored.status_code == 200, restored.text
restored_task = client.get("/api/v1/tasks", params={"q": "完整备份任务"}).json()["items"][0]
restored_items = client.get("/api/v1/tasks", params={"limit": 100}).json()["items"]
restored_task = next(item for item in restored_items if item["title"] == "完整备份任务")
restored_attachment = client.get(f"/api/v1/tasks/{restored_task['id']}/attachments").json()[0]
assert client.get(f"/api/v1/attachments/{restored_attachment['id']}").content == attachment_bytes
@@ -643,8 +644,9 @@ def test_restore_handles_child_before_parent_task_order(client):
"/api/v1/backup/restore", json={"preflight_token": token, "mode": "replace"}
)
assert restored.status_code == 200, restored.text
items = client.get("/api/v1/tasks", params={"q": "parent"}).json()["items"]
assert items[0]["subtasks"][0]["title"] == "child"
items = client.get("/api/v1/tasks", params={"limit": 100}).json()["items"]
restored_parent = next(item for item in items if item["title"] == "parent")
assert restored_parent["subtasks"][0]["title"] == "child"
def test_replace_restores_quarantined_files_when_database_write_fails(client, tmp_path, monkeypatch):
@@ -682,7 +684,8 @@ def test_replace_restores_quarantined_files_when_database_write_fails(client, tm
)
assert old_path.read_bytes() == old_bytes
assert client.get("/api/v1/tasks", params={"q": "old"}).json()["items"]
restored_items = client.get("/api/v1/tasks", params={"limit": 100}).json()["items"]
assert any(item["title"] == "old" for item in restored_items)
def test_archive_blob_is_never_read_whole(client, tmp_path, monkeypatch):