fix(tests): fix remaining test failures

This commit is contained in:
2026-09-28 19:49:05 +04:00
parent 37a2384fde
commit fe31a8893b
3 changed files with 10 additions and 7 deletions
+3 -3
View File
@@ -54,7 +54,7 @@ def test_plot_endpoint(client, sample_csv_path):
with open(sample_csv_path, "rb") as f:
response = client.post(
"/api/v1/plot",
files={"file": f},
files={"file": (sample_csv_path.name, f, "text/csv")},
data={"unit": "us"},
)
assert response.status_code == 200
@@ -66,7 +66,7 @@ def test_plot_with_options(client, sample_csv_path):
with open(sample_csv_path, "rb") as f:
response = client.post(
"/api/v1/plot",
files={"file": f},
files={"file": (sample_csv_path.name, f, "text/csv")},
data={
"metric": "read_clat",
"unit": "ms",
@@ -82,7 +82,7 @@ def test_invalid_metric(client, sample_csv_path):
with open(sample_csv_path, "rb") as f:
response = client.post(
"/api/v1/plot",
files={"file": f},
files={"file": (sample_csv_path.name, f, "text/csv")},
data={"metric": "invalid_metric", "unit": "us"},
)
assert response.status_code == 400