From 5fb66f9a85d97e7c8b0b54082f09da360f38d60b Mon Sep 17 00:00:00 2001 From: Tanya Date: Fri, 9 Jan 2026 12:48:22 -0500 Subject: [PATCH] fix: Handle charset parameter in SSE Content-Type header test The SSE endpoint returns 'text/event-stream; charset=utf-8' but the test was checking for an exact match. Update the test to use startswith() to handle the charset parameter correctly. --- tests/test_api_jobs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_api_jobs.py b/tests/test_api_jobs.py index 9a22d1f..3c03039 100644 --- a/tests/test_api_jobs.py +++ b/tests/test_api_jobs.py @@ -67,6 +67,7 @@ class TestJobStreaming: response = test_client.get("/api/v1/jobs/stream/test-job-id") if response.status_code == 200: - # Check Content-Type for SSE - assert response.headers.get("content-type") == "text/event-stream" + # Check Content-Type for SSE (may include charset parameter) + content_type = response.headers.get("content-type", "") + assert content_type.startswith("text/event-stream")