Files
transcription/tests/ui/test_pages_registration.py
T
2026-06-25 10:00:00 -05:00

27 lines
823 B
Python

"""Tests for UI page registration wiring."""
from fastapi import FastAPI
from fastapi.testclient import TestClient
import pytest
from transcription.ui import register_pages
@pytest.mark.integration
class TestPageRegistration:
"""Verify page registration and route wiring."""
def test_register_pages_adds_expected_routes(self):
"""register_pages wires upload and jobs routes into the app."""
app = FastAPI()
register_pages(app)
app.add_api_route("/healthz", lambda: {"status": "ok"}, methods=["GET"])
client = TestClient(app)
ui_response = client.get("/ui")
health_response = client.get("/healthz")
assert ui_response.status_code == 200
assert health_response.status_code == 200
assert health_response.json() == {"status": "ok"}