fix tests
Continuous Integration / frontend-check (push) Failing after 5m16s
Continuous Integration / backend-tests (push) Successful in 10m12s

This commit is contained in:
2026-04-27 22:28:32 -04:00
parent 8339762dce
commit c6ead790cc
+2 -3
View File
@@ -1,13 +1,13 @@
from app.db import models
from datetime import datetime, timezone
from app.db import models
def test_get_dashboard_stats_empty(client):
"""Tests the dashboard stats endpoint when the database is empty."""
response = client.get("/system/dashboard/stats")
assert response.status_code == 200
data = response.json()
assert data["total_files_indexed"] == 0
assert data["total_data_size"] == 0
assert data["unprotected_files_count"] == 0
assert data["media_distribution"] == {"LTO": 0, "HDD": 0, "Cloud": 0}
@@ -29,7 +29,6 @@ def test_get_dashboard_stats_populated(client, db_session):
response = client.get("/system/dashboard/stats")
assert response.status_code == 200
data = response.json()
assert data["total_files_indexed"] == 1
assert data["unprotected_files_count"] == 1
assert data["unprotected_data_size"] == 1024