fix tests
This commit is contained in:
@@ -74,7 +74,7 @@ class TestQueueDisplay:
|
||||
data = response.json()
|
||||
|
||||
# Verify structure
|
||||
assert "status" in data
|
||||
assert "is_running" in data
|
||||
assert "statistics" in data
|
||||
|
||||
status = data["status"]
|
||||
@@ -107,7 +107,7 @@ class TestQueueDisplay:
|
||||
assert response.status_code == 200
|
||||
|
||||
data = response.json()
|
||||
pending = data["status"]["pending"]
|
||||
pending = data["pending_queue"]
|
||||
|
||||
assert len(pending) > 0
|
||||
item = pending[0]
|
||||
@@ -140,7 +140,7 @@ class TestQueueReordering:
|
||||
)
|
||||
existing_items = [
|
||||
item["id"]
|
||||
for item in status_response.json()["status"]["pending"]
|
||||
for item in status_response.json()["pending_queue"]
|
||||
]
|
||||
if existing_items:
|
||||
await client.request(
|
||||
@@ -190,7 +190,7 @@ class TestQueueReordering:
|
||||
)
|
||||
current_order = [
|
||||
item["id"]
|
||||
for item in status_response.json()["status"]["pending"]
|
||||
for item in status_response.json()["pending_queue"]
|
||||
]
|
||||
|
||||
assert current_order == new_order
|
||||
@@ -270,7 +270,7 @@ class TestQueueControl:
|
||||
"/api/queue/status",
|
||||
headers=auth_headers
|
||||
)
|
||||
assert status.json()["status"]["is_running"] is False
|
||||
assert status.json()["is_running"] is False
|
||||
|
||||
# Start queue
|
||||
await client.post("/api/queue/start", headers=auth_headers)
|
||||
@@ -280,7 +280,7 @@ class TestQueueControl:
|
||||
"/api/queue/status",
|
||||
headers=auth_headers
|
||||
)
|
||||
assert status.json()["status"]["is_running"] is True
|
||||
assert status.json()["is_running"] is True
|
||||
|
||||
# Stop queue
|
||||
await client.post("/api/queue/stop", headers=auth_headers)
|
||||
@@ -290,7 +290,7 @@ class TestQueueControl:
|
||||
"/api/queue/status",
|
||||
headers=auth_headers
|
||||
)
|
||||
assert status.json()["status"]["is_running"] is False
|
||||
assert status.json()["is_running"] is False
|
||||
|
||||
|
||||
class TestCompletedDownloads:
|
||||
@@ -323,7 +323,7 @@ class TestCompletedDownloads:
|
||||
data = status.json()
|
||||
|
||||
completed_count = data["statistics"]["completed_count"]
|
||||
completed_list = len(data["status"]["completed"])
|
||||
completed_list = len(data["completed_downloads"])
|
||||
|
||||
# Count should match list length
|
||||
assert completed_count == completed_list
|
||||
@@ -390,7 +390,7 @@ class TestFailedDownloads:
|
||||
data = status.json()
|
||||
|
||||
failed_count = data["statistics"]["failed_count"]
|
||||
failed_list = len(data["status"]["failed"])
|
||||
failed_list = len(data["failed_downloads"])
|
||||
|
||||
# Count should match list length
|
||||
assert failed_count == failed_list
|
||||
|
||||
Reference in New Issue
Block a user