fix(tests): fix failing tests and add missing imports
This commit is contained in:
+6
-2
@@ -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
|
||||
Reference in New Issue
Block a user