This commit is contained in:
@@ -31,10 +31,18 @@ def test_recurring_calendar_exceptions_and_scopes(client):
|
||||
)
|
||||
assert recurrence.status_code == 201
|
||||
recurrence_id = recurrence.json()["id"]
|
||||
yearly = client.post(
|
||||
"/api/v1/tasks",
|
||||
json={"title": "年度任务", "list_id": inbox["id"], "due_at": "2026-09-06T09:00:00Z"},
|
||||
).json()
|
||||
assert client.post(
|
||||
"/api/v1/recurrences", json={"task_id": yearly["id"], "rrule": "FREQ=YEARLY;INTERVAL=1;BYMONTH=9;BYMONTHDAY=6"}
|
||||
).status_code == 201
|
||||
calendar = client.get(
|
||||
"/api/v1/calendar", params={"start": "2026-09-01", "end": "2026-09-30"}
|
||||
).json()
|
||||
assert any(row.get("id") == normal_task["id"] for row in calendar)
|
||||
assert any(row["title"] == "年度任务" for row in calendar)
|
||||
assert not any(row["title"] == "月外普通任务" for row in calendar)
|
||||
occurrences = [row for row in calendar if row["recurrence_id"] == recurrence_id]
|
||||
assert len(occurrences) == 5
|
||||
|
||||
Reference in New Issue
Block a user