25 lines
548 B
Python
25 lines
548 B
Python
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
|