test: increased cb test coverage
This commit is contained in:
committed by
Luijkx,S.O.H. (Storm)
parent
de2e56ffce
commit
7f7c658901
24
test/unit/api/v1/endpoints/test_sse_endpoint.py
Normal file
24
test/unit/api/v1/endpoints/test_sse_endpoint.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import pytest
|
||||
from fastapi import FastAPI
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from control_backend.api.v1.endpoints import sse
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def app():
|
||||
app = FastAPI()
|
||||
app.include_router(sse.router)
|
||||
return app
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client(app):
|
||||
return TestClient(app)
|
||||
|
||||
|
||||
def test_sse_route_exists(client):
|
||||
"""Minimal smoke test to ensure /sse route exists and responds."""
|
||||
response = client.get("/sse")
|
||||
# Since implementation is not done, we only assert it doesn't crash
|
||||
assert response.status_code == 200
|
||||
Reference in New Issue
Block a user