download re implemented
This commit is contained in:
@@ -247,23 +247,17 @@ class TestFrontendDownloadAPI:
|
||||
assert "status" in data or "statistics" in data
|
||||
|
||||
async def test_start_download_queue(self, authenticated_client):
|
||||
"""Test POST /api/queue/start starts queue."""
|
||||
"""Test POST /api/queue/start starts next download."""
|
||||
response = await authenticated_client.post("/api/queue/start")
|
||||
|
||||
assert response.status_code == 200
|
||||
# Should return 200 with item_id, or 400 if queue is empty
|
||||
assert response.status_code in [200, 400]
|
||||
data = response.json()
|
||||
assert "message" in data or "status" in data
|
||||
|
||||
async def test_pause_download_queue(self, authenticated_client):
|
||||
"""Test POST /api/queue/pause pauses queue."""
|
||||
response = await authenticated_client.post("/api/queue/pause")
|
||||
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert "message" in data or "status" in data
|
||||
if response.status_code == 200:
|
||||
assert "item_id" in data
|
||||
|
||||
async def test_stop_download_queue(self, authenticated_client):
|
||||
"""Test POST /api/queue/stop stops queue."""
|
||||
"""Test POST /api/queue/stop stops processing new downloads."""
|
||||
response = await authenticated_client.post("/api/queue/stop")
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
Reference in New Issue
Block a user