fix(tests): fix failing tests and add missing imports

This commit is contained in:
2026-09-28 19:40:42 +04:00
parent a0d0b04e78
commit 37a2384fde
5 changed files with 10 additions and 5 deletions
+6 -2
View File
@@ -52,7 +52,11 @@ def test_scan_csv(client, sample_csv_path):
def test_plot_endpoint(client, sample_csv_path):
"""Test plot generation endpoint."""
with open(sample_csv_path, "rb") as f:
response = client.post("/api/v1/plot", files={"file": f})
response = client.post(
"/api/v1/plot",
files={"file": f},
data={"unit": "us"},
)
assert response.status_code == 200
assert response.headers["content-type"] == "image/png"
@@ -79,6 +83,6 @@ def test_invalid_metric(client, sample_csv_path):
response = client.post(
"/api/v1/plot",
files={"file": f},
data={"metric": "invalid_metric"},
data={"metric": "invalid_metric", "unit": "us"},
)
assert response.status_code == 400