This commit is contained in:
@@ -107,6 +107,20 @@ def test_attachment_security_ownership_and_size(client, tmp_path, monkeypatch):
|
||||
assert client.delete(f"/api/v1/attachments/{attachment['id']}").status_code == 204
|
||||
|
||||
|
||||
def test_tasks_can_be_loaded_by_list_and_completion_filter(client):
|
||||
inbox = boot(client)
|
||||
other = client.post("/api/v1/lists", json={"name": "其他清单"}).json()
|
||||
client.post("/api/v1/tasks", json={"title": "收集箱未完成", "list_id": inbox["id"]})
|
||||
done = client.post("/api/v1/tasks", json={"title": "收集箱已完成", "list_id": inbox["id"]}).json()
|
||||
client.patch(f"/api/v1/tasks/{done['id']}", json={"completed": True, "version": done["version"]})
|
||||
client.post("/api/v1/tasks", json={"title": "其他清单未完成", "list_id": other["id"]})
|
||||
|
||||
response = client.get("/api/v1/tasks", params={"list_id": inbox["id"], "completed": False})
|
||||
|
||||
assert response.status_code == 200
|
||||
assert [item["title"] for item in response.json()["items"]] == ["收集箱未完成"]
|
||||
|
||||
|
||||
def test_ticktick_preview_import_dedupe_and_json_restore(client):
|
||||
boot(client)
|
||||
csv_data = "Title,List Name,Due Date,Status,ID\nImported,Inbox,2026-10-01,0,ext-1\n"
|
||||
|
||||
Reference in New Issue
Block a user