feat: strengthen backup and mobile workflows
This commit is contained in:
+3
-2
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user