fixed some tests
This commit is contained in:
@@ -243,18 +243,19 @@ class TestFrontendDownloadAPI:
|
||||
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
# Check for expected response structure
|
||||
assert "is_running" in data or "statistics" in data
|
||||
# Check for expected response structure (nested status)
|
||||
assert "status" in data
|
||||
assert "statistics" in data
|
||||
|
||||
async def test_start_download_queue(self, authenticated_client):
|
||||
"""Test POST /api/queue/start starts next download."""
|
||||
response = await authenticated_client.post("/api/queue/start")
|
||||
|
||||
# Should return 200 with item_id, or 400 if queue is empty
|
||||
# Should return 200 with success message, or 400 if queue is empty
|
||||
assert response.status_code in [200, 400]
|
||||
data = response.json()
|
||||
if response.status_code == 200:
|
||||
assert "item_id" in data
|
||||
assert "message" in data or "status" in data
|
||||
|
||||
async def test_stop_download_queue(self, authenticated_client):
|
||||
"""Test POST /api/queue/stop stops processing new downloads."""
|
||||
|
||||
Reference in New Issue
Block a user