Validating UI Endpoint Configuration in private-gpt
This test suite validates the UI functionality of the private-gpt application, focusing on endpoint configuration and response handling. It ensures the UI component initializes correctly and responds appropriately to HTTP requests.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
zylon-ai/private-gpt
tests/ui/test_ui.py
import pytest
from fastapi.testclient import TestClient
@pytest.mark.parametrize(
"test_client", [{"ui": {"enabled": True, "path": "/ui"}}], indirect=True
)
def test_ui_starts_in_the_given_endpoint(test_client: TestClient) -> None:
response = test_client.get("/ui")
assert response.status_code == 200