[tests] Update API tests to use /api prefix

- Simplified api_client fixture to hardcode /api prefix
- Updated websocket endpoint test to use /api/ws
- Fixed internal endpoint tests to not use /api prefix
- Enhanced validation.py to handle OpenAPI nullable syntax
This commit is contained in:
bymyself
2025-06-28 22:30:37 -07:00
parent 2a032017b2
commit 2ff6b5388e
3 changed files with 55 additions and 28 deletions

View File

@@ -93,7 +93,8 @@ def api_client(base_url: str) -> Generator[Optional[requests.Session], None, Non
# Helper function to construct URLs
def get_url(path: str) -> str:
return urljoin(base_url, path)
# All API endpoints use the /api prefix
return urljoin(base_url, '/api' + path)
# Add url helper to the session
session.get_url = get_url # type: ignore