feat: B3 uit voor veilige archive-downloads - cancel knop toegevoegd

This commit is contained in:
kodi
2026-03-14 14:39:57 +01:00
parent d463b3977d
commit 2981ac2796
24 changed files with 471 additions and 37 deletions
@@ -263,6 +263,28 @@ class TasksApiGoldenTest(unittest.TestCase):
self.assertEqual(body["status"], "ready")
self.assertEqual(body["destination"], "docs.zip")
def test_get_task_detail_cancelled_archive_download(self) -> None:
self._insert_task(
task_id="task-download-cancelled",
operation="download",
status="cancelled",
source="storage1/docs",
destination="docs.zip",
created_at="2026-03-10T10:00:00Z",
started_at="2026-03-10T10:00:01Z",
finished_at="2026-03-10T10:00:03Z",
done_items=0,
total_items=1,
)
response = self._get("/api/tasks/task-download-cancelled")
self.assertEqual(response.status_code, 200)
body = response.json()
self.assertEqual(body["operation"], "download")
self.assertEqual(body["status"], "cancelled")
self.assertEqual(body["destination"], "docs.zip")
def test_get_task_not_found(self) -> None:
response = self._get("/api/tasks/task-missing")