diff --git a/tests/test_api.py b/tests/test_api.py index 20a0f64..91c587b 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -194,5 +194,8 @@ class TestBlackboardAPI: class TestSSE: def test_sse_connection(self, client): - resp = client.get("/api/events") - assert resp.status_code == 200 + with client.stream("GET", "/api/events") as resp: + assert resp.status_code == 200 + # Read first chunk (connected event or heartbeat) + chunk = next(resp.iter_lines()) + assert chunk # Got some data