Files
privateGPT/tests/server/test_ui_mount.py
Javier Martinez 183cd03857 feat!: PrivateGPT revamp v1 (#2230)
* feat!: PrivateGPT revamp v1

* chore(docs): update nodejs
2026-06-02 16:55:46 +02:00

19 lines
606 B
Python

from fastapi.testclient import TestClient
def test_ui_path_still_serves_bundled_ui_index(test_client: TestClient) -> None:
response = test_client.get("/ui/")
assert response.status_code == 200
assert response.headers["content-type"].startswith("text/html")
assert 'const DEFAULT_BASE_URL = "http://127.0.0.1:8080";' in response.text
def test_ui_path_without_trailing_slash_redirects_to_index(
test_client: TestClient,
) -> None:
response = test_client.get("/ui", follow_redirects=False)
assert response.status_code == 307
assert response.headers["location"] == "/ui/"