Step 5 implemented

This commit is contained in:
Jim Lancaster
2026-06-25 10:00:00 -05:00
parent abf5829c6b
commit 3e057c0eff
15 changed files with 1796 additions and 33 deletions
+26
View File
@@ -0,0 +1,26 @@
"""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"}