feat: strengthen backup and mobile workflows
ci / gitleaks (push) Successful in 1m19s
ci / docker (push) Successful in 5m48s

This commit is contained in:
2026-09-16 21:12:52 +08:00
parent 6f38190c92
commit 6c234d7d82
64 changed files with 5059 additions and 635 deletions
+3 -2
View File
@@ -532,12 +532,13 @@ def test_restore_replace_recovers_habits_and_task_links_without_tags(client):
"/api/v1/habits",
json={"name": "深蹲", "kind": "boolean", "schedule_type": "daily"},
)
restored = client.post("/api/v1/restore?mode=replace", json=exported.json())
restored = client.post("/api/v1/restore?mode=merge", json=exported.json())
assert restored.status_code == 200
assert client.get("/api/v1/tags").status_code == 404
habits = client.get("/api/v1/habits").json()
assert [row["name"] for row in habits] == ["俯卧撑"]
assert "俯卧撑" in [row["name"] for row in habits]
assert "深蹲" in [row["name"] for row in habits]
listed = client.get("/api/v1/tasks", params={"q": "备份任务"}).json()["items"]
assert "tags" not in listed[0]